mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Adds a new admin/runtime verb that allows you to easily access global variables without lag (#22407)
* fuq yeah * AA review
This commit is contained in:
@@ -1420,3 +1420,29 @@
|
||||
if(href_list["listrefresh"])
|
||||
debug_variables(locate(href_list["listrefresh"]))
|
||||
return TRUE
|
||||
|
||||
/client/proc/debug_global_variables(var_search as text)
|
||||
set category = "Debug"
|
||||
set name = "Debug Global Variables"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_VIEWRUNTIMES))
|
||||
to_chat(usr, "<span class='warning'>You need to be an administrator to access this.</span>")
|
||||
return
|
||||
|
||||
var_search = trim(var_search)
|
||||
if(!var_search)
|
||||
return
|
||||
if(!GLOB.can_vv_get(var_search))
|
||||
return
|
||||
switch(var_search)
|
||||
if("vars")
|
||||
return FALSE
|
||||
if(!(var_search in GLOB.vars))
|
||||
to_chat(src, "<span class='debug'>GLOB.[var_search] does not exist.</span>")
|
||||
return
|
||||
log_and_message_admins("is debugging the Global Variables controller with the search term \"[var_search]\"")
|
||||
var/result = GLOB.vars[var_search]
|
||||
if(islist(result) || isclient(result) || istype(result, /datum))
|
||||
to_chat(src, "<span class='debug'>Now showing GLOB.[var_search].</span>")
|
||||
return debug_variables(result)
|
||||
to_chat(src, "<span class='debug'>GLOB.[var_search] returned [result].</span>")
|
||||
|
||||
Reference in New Issue
Block a user