Merge pull request #749 from SkyMarshal/Airlocks

Adds in the option to specify UID (The hexadecimal references) when you are variable editing.
This commit is contained in:
CIB
2012-03-25 03:10:22 -07:00
2 changed files with 120 additions and 8 deletions
+51 -3
View File
@@ -86,7 +86,23 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
lst[i] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if("reference")
lst[i] = input("Select reference:","Reference",src) as mob|obj|turf|area in world
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
var/temp_variable = locate("\[0x[UID]\]")
if(!temp_variable)
usr << "ERROR. Could not locate referenced object."
return
switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!"))
if("Yes")
lst[i] = temp_variable
if("NONOCANCEL!")
return
if("Search")
lst[i] = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
lst[i] = input("Select reference:","Reference",usr) as mob in world
@@ -148,7 +164,23 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
argL.Add( input("Enter type:","Type",null) in typesof(/obj,/mob,/area,/turf) )
if("reference")
argL.Add( input("Select reference:","Reference",null) as mob|obj|turf|area in world )
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
var/temp_variable = locate("\[0x[UID]\]")
if(!temp_variable)
usr << "ERROR. Could not locate referenced object."
return
switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!"))
if("Yes")
argL.Add(temp_variable)
if("NONOCANCEL!")
return
if("Search")
argL.Add(input("Select reference:","Reference") as null|mob|obj|turf|area in world)
if("icon")
argL.Add( input("Pick icon:","Icon",null) as icon )
@@ -200,7 +232,23 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
argL.Add( input("Enter type:","Type",null) in typesof(/obj,/mob,/area,/turf) )
if("reference")
argL.Add( input("Select reference:","Reference",null) as mob|obj|turf|area in world )
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
var/temp_variable = locate("\[0x[UID]\]")
if(!temp_variable)
usr << "ERROR. Could not locate referenced object."
return
switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!"))
if("Yes")
argL.Add(temp_variable)
if("NONOCANCEL!")
return
if("Search")
argL.Add(input("Select reference:","Reference") as null|mob|obj|turf|area in world)
if("icon")
argL.Add( input("Pick icon:","Icon",null) as icon )
+69 -5
View File
@@ -43,7 +43,23 @@
var_value = input("Enter type:","Type") as null|anything in typesof(/obj,/mob,/area,/turf)
if("reference")
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
var/temp_variable = locate("\[0x[UID]\]")
if(!temp_variable)
usr << "ERROR. Could not locate referenced object."
return
switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!"))
if("Yes")
var_value = temp_variable
if("NONOCANCEL!")
return
if("Search")
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as null|mob in world
@@ -92,7 +108,23 @@
var_value = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if("reference")
var_value = input("Select reference:","Reference") as mob|obj|turf|area in world
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
var/temp_variable = locate("\[0x[UID]\]")
if(!temp_variable)
usr << "ERROR. Could not locate referenced object."
return
switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!"))
if("Yes")
var_value = temp_variable
if("NONOCANCEL!")
return
if("Search")
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as mob in world
@@ -242,8 +274,23 @@
in typesof(/obj,/mob,/area,/turf)
if("reference")
variable = input("Select reference:","Reference",\
variable) as mob|obj|turf|area in world
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
var/temp_variable = locate("\[0x[UID]\]")
if(!temp_variable)
usr << "ERROR. Could not locate referenced object."
return
switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!"))
if("Yes")
variable = temp_variable
if("NONOCANCEL!")
return
if("Search")
variable = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
variable = input("Select reference:","Reference",\
@@ -464,7 +511,24 @@
O.vars[variable] = var_new
if("reference")
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob|obj|turf|area in world
var/var_new
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
var/temp_variable = locate("\[0x[UID]\]")
if(!temp_variable)
usr << "ERROR. Could not locate referenced object."
return
switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!"))
if("Yes")
var_new = temp_variable
if("NONOCANCEL!")
return
if("Search")
var_new = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if(var_new==null) return
O.vars[variable] = var_new