mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01: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:
@@ -199,14 +199,14 @@
|
||||
while(Li <= L.len && Ri <= R.len)
|
||||
if(sorttext(L[Li], R[Ri]) < 1)
|
||||
var/item = R[Ri++]
|
||||
if(R[item])
|
||||
if(istext(item) && !isnull(R[item]))
|
||||
result[item] = R[item]
|
||||
else
|
||||
result += item
|
||||
|
||||
else
|
||||
var/item = L[Li++]
|
||||
if(L[item])
|
||||
if(istext(item) && !isnull(L[item]))
|
||||
result[item] = L[item]
|
||||
else
|
||||
result += item
|
||||
|
||||
+3
-3
@@ -88,9 +88,9 @@ client/verb/Toggle_Soundscape() //All new ambience should be added here so it wo
|
||||
if (!A:client) return
|
||||
//if (A:ear_deaf) return
|
||||
|
||||
if (A && A:client && !A:client:ambience_playing && !A:client:no_ambi) // Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas next to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
|
||||
A:client:ambience_playing = 1
|
||||
A << sound('shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
|
||||
// if (A && A:client && !A:client:ambience_playing && !A:client:no_ambi) // Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas next to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
|
||||
// A:client:ambience_playing = 1
|
||||
// A << sound('shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
|
||||
|
||||
switch(src.name)
|
||||
if ("Chapel") sound = pick('ambicha1.ogg','ambicha2.ogg','ambicha3.ogg','ambicha4.ogg')
|
||||
|
||||
@@ -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