Further improved stuff for dealing with associative lists. You can now modify the contents of an associative list. Removed static background noise. Added CarbonCopy command from oldcode.

This commit is contained in:
SkyMarshal
2012-04-04 23:02:24 -07:00
parent 9b1f50bf35
commit e8f5e13bd2
4 changed files with 32 additions and 7 deletions

View File

@@ -163,6 +163,11 @@
if(!variable)
return
var/associative
if(istext(variable) && !isnull(L[variable]))
associative = variable
variable = L[variable]
var/default
var/dir
@@ -252,13 +257,19 @@
mod_list(variable)
if("restore to default")
variable = initial(variable)
if(associative)
L[associative] = initial(L[associative])
else
variable = initial(variable)
if("edit referenced object")
modify_variables(variable)
if("(DELETE FROM LIST)")
L -= variable
if(associative)
L.Remove(associative)
return
L.Remove(variable)
return
if("text")
@@ -307,6 +318,9 @@
if("marked datum")
variable = holder.marked_datum
if(associative)
L[associative] = variable
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")