mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 05:52:17 +00:00
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:
@@ -141,6 +141,7 @@
|
||||
verbs += /client/proc/callprocgen
|
||||
verbs += /client/proc/callprocobj
|
||||
verbs += /client/proc/rnd_check_designs
|
||||
verbs += /client/proc/CarbonCopy
|
||||
|
||||
if (holder.level >= 5)//Game Admin********************************************************************
|
||||
verbs += /obj/admins/proc/view_txt_log
|
||||
@@ -181,6 +182,7 @@
|
||||
verbs += /client/proc/Force_Event_admin
|
||||
verbs += /client/proc/radioalert
|
||||
verbs += /client/proc/make_tajaran
|
||||
verbs += /client/proc/CarbonCopy
|
||||
|
||||
if (holder.level >= 4)//Badmin********************************************************************
|
||||
verbs += /obj/admins/proc/adrev //toggle admin revives
|
||||
@@ -428,6 +430,7 @@
|
||||
verbs -= /client/proc/radioalert
|
||||
verbs -= /client/proc/rnd_check_designs
|
||||
verbs -= /client/proc/make_tajaran
|
||||
verbs -= /client/proc/CarbonCopy
|
||||
|
||||
return
|
||||
|
||||
@@ -892,3 +895,11 @@
|
||||
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)
|
||||
a.autosay(message,from)
|
||||
del(a)
|
||||
|
||||
/client/proc/CarbonCopy(atom/movable/O as mob|obj in world)
|
||||
set category = "Admin"
|
||||
var/mob/NewObj = new O.type(usr.loc)
|
||||
for(var/V in O.vars)
|
||||
if (issaved(O.vars[V]))
|
||||
NewObj.vars[V] = O.vars[V]
|
||||
return NewObj
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user