From c752661399ae32a0cd73ca09aabde284a9a5c603 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 6 Mar 2020 01:51:20 -0700 Subject: [PATCH] Update datumvars.dm --- code/datums/datumvars.dm | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index b7ec8f38dc..a9830e58dc 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -26,10 +26,10 @@ /datum/proc/vv_get_dropdown() . = list() . += "---" - .["Call Proc"] = "?_src_=vars;[HrefToken()];proc_call=[REF(src)]" - .["Mark Object"] = "?_src_=vars;[HrefToken()];mark_object=[REF(src)]" - .["Delete"] = "?_src_=vars;[HrefToken()];delete=[REF(src)]" - .["Show VV To Player"] = "?_src_=vars;[HrefToken(TRUE)];expose=[REF(src)]" + .["Call Proc"] = "?_src_=vars;[HrefToken()];proc_call=\ref[src]" + .["Mark Object"] = "?_src_=vars;[HrefToken()];mark_object=\ref[src]" + .["Delete"] = "?_src_=vars;[HrefToken()];delete=\ref[src]" + .["Show VV To Player"] = "?_src_=vars;[HrefToken(TRUE)];expose=\ref[src]" /datum/proc/on_reagent_change(changetype) @@ -54,7 +54,7 @@ return var/title = "" - var/refid = REF(D) + var/refid = "\ref[D]" var/icon/sprite var/hash @@ -62,8 +62,6 @@ if (!islist) type = D.type - - if(istype(D, /atom)) var/atom/AT = D if(AT.icon && AT.icon_state) @@ -410,7 +408,7 @@ /client/proc/vv_update_display(datum/D, span, content) - src << output("[span]:[content]", "variables[REF(D)].browser:replace_span") + src << output("[span]:[content]", "variables\ref[D].browser:replace_span") #define VV_HTML_ENCODE(thing) ( sanitize ? html_encode(thing) : thing ) @@ -423,9 +421,9 @@ name = DA[name] //name is really the index until this line else value = DA[name] - header = "
  • (E) (C) (-) " + header = "
  • (E) (C) (-) " else - header = "
  • (E) (C) (M) " + header = "
  • (E) (C) (M) " else header = "
  • " @@ -440,7 +438,7 @@ #ifdef VARSICON var/icon/I = new/icon(value) var/rnd = rand(1,10000) - var/rname = "tmp[REF(I)][rnd].png" + var/rname = "tmp\ref[I][rnd].png" usr << browse_rsc(I, rname) item = "[VV_HTML_ENCODE(name)] = ([value]) " #else @@ -453,9 +451,9 @@ else if (istype(value, /datum)) var/datum/D = value if ("[D]" != "[D.type]") //if the thing as a name var, lets use it. - item = "[VV_HTML_ENCODE(name)] [REF(value)] = [D] [D.type]" + item = "[VV_HTML_ENCODE(name)] [REF(value)] = [D] [D.type]" else - item = "[VV_HTML_ENCODE(name)] [REF(value)] = [D.type]" + item = "[VV_HTML_ENCODE(name)] [REF(value)] = [D.type]" else if (islist(value)) var/list/L = value @@ -473,9 +471,9 @@ items += debug_variable(key, val, level + 1, sanitize = sanitize) - item = "[VV_HTML_ENCODE(name)] = /list ([L.len])" + item = "[VV_HTML_ENCODE(name)] = /list ([L.len])" else - item = "[VV_HTML_ENCODE(name)] = /list ([L.len])" + item = "[VV_HTML_ENCODE(name)] = /list ([L.len])" else if (name in GLOB.bitfields) var/list/flags = list() @@ -587,7 +585,7 @@ var/prompt = alert("Do you want to grant [C] access to view this VV window? (they will not be able to edit or change anything nor open nested vv windows unless they themselves are an admin)", "Confirm", "Yes", "No") if (prompt != "Yes" || !usr.client) return - message_admins("[key_name_admin(usr)] Showed [key_name_admin(C)] a VV window") + message_admins("[key_name_admin(usr)] Showed [key_name_admin(C)] a VV window") log_admin("Admin [key_name(usr)] Showed [key_name(C)] a VV window of a [thing]") to_chat(C, "[usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"] has granted you access to view a View Variables window") C.debug_variables(thing)