diff --git a/code/modules/admin/verbs/debug.dm.rej b/code/modules/admin/verbs/debug.dm.rej new file mode 100644 index 0000000000..b5277b316c --- /dev/null +++ b/code/modules/admin/verbs/debug.dm.rej @@ -0,0 +1,41 @@ +diff a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm (rejected hunks) +@@ -83,17 +83,23 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that + to_chat(usr, .) + feedback_add_details("admin_verb","Advanced ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +-GLOBAL_VAR_INIT(AdminProcCall, null) +-GLOBAL_PROTECT(AdminProcCall) ++GLOBAL_VAR_INIT(AdminProcCaller, null) ++GLOBAL_PROTECT(AdminProcCaller) ++GLOBAL_VAR_INIT(AdminProcCallCount, 0) ++GLOBAL_PROTECT(AdminProcCallCount) + + /proc/WrapAdminProcCall(target, procname, list/arguments) +- if(GLOB.AdminProcCall) +- to_chat(usr, "Another admin called proc is still running, your proc will be run after theirs finishes") +- UNTIL(!GLOB.AdminProcCall) ++ var/current_caller = GLOB.AdminProcCaller ++ var/ckey = usr.client.ckey ++ if(current_caller && current_caller != ckey) ++ to_chat(usr, "Another set of admin called procs are still running, your proc will be run after theirs finish.") ++ UNTIL(!GLOB.AdminProcCaller) + to_chat(usr, "Running your proc") +- GLOB.AdminProcCall = usr.client.ckey //if this runtimes, too bad for you ++ GLOB.AdminProcCaller = ckey //if this runtimes, too bad for you ++ ++GLOB.AdminProcCallCount + world.WrapAdminProcCall(target, procname, arguments) +- GLOB.AdminProcCall = null ++ if(--GLOB.AdminProcCallCount == 0) ++ GLOB.AdminProcCaller = null + + //adv proc call this, ya nerds + /world/proc/WrapAdminProcCall(target, procname, list/arguments) +@@ -103,7 +109,7 @@ GLOBAL_PROTECT(AdminProcCall) + return call(procname)(arglist(arguments)) + + /proc/IsAdminAdvancedProcCall() +- return usr && usr.client && GLOB.AdminProcCall == usr.client.ckey ++ return usr && usr.client && GLOB.AdminProcCaller == usr.client.ckey + + /client/proc/callproc_datum(datum/A as null|area|mob|obj|turf) + set category = "Debug"