[MIRROR] Fix GLOB Edit button crashing the server (#7548)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
CHOMPStation2
2024-01-14 16:08:02 -07:00
committed by GitHub
parent 44eecddb7e
commit 63b26c4ce8
2 changed files with 241 additions and 239 deletions

View File

@@ -36,7 +36,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
if(!statclick)
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
stat("GLOB:", "Button Removed Due To Crashing") //VOREStation Edit
stat("GLOB:", statclick.update("Edit"))
/datum/controller/global_vars/vv_edit_var(var_name, var_value)
if(gvars_datum_protected_varlist[var_name])

View File

@@ -15,6 +15,8 @@
if (!islist && !istype(D))
return
//VOREStation Edit Start - the rest of this proc in a spawn
spawn(0)
var/title = ""
var/refid = "\ref[D]"
var/icon/sprite
@@ -79,7 +81,7 @@
var/list/names = list()
if (!islist)
names = D.get_variables()
sleep(1)//For some reason, without this sleep, VVing will cause client to disconnect on certain objects.
//sleep(1)//For some reason, without this sleep, VVing will cause client to disconnect on certain objects. //VOREStation edit - commented out, replaced with spawn(0) above
var/list/variable_html = list()
if (islist)
@@ -277,7 +279,7 @@ datumrefresh=[refid]'>Refresh</a>
</body>
</html>
"}
src << browse(html, "window=variables[refid];size=475x650")
src << browse(html, "window=variables[refid];size=475x650") //VOREStation edit end
/client/proc/vv_update_display(datum/D, span, content)
src << output("[span]:[content]", "variables\ref[D].browser:replace_span")