From 180e53816c7906287b4782ed074e35eb000cf6a1 Mon Sep 17 00:00:00 2001 From: Lucy Date: Sat, 7 Dec 2024 19:31:04 -0500 Subject: [PATCH] Adds a warning+confirmation for admins calling Shake() --- code/modules/admin/callproc/callproc.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm index b43d6b01d49b..3ca4a3120320 100644 --- a/code/modules/admin/callproc/callproc.dm +++ b/code/modules/admin/callproc/callproc.dm @@ -219,6 +219,17 @@ GLOBAL_PROTECT(LastAdminCalledProc) if(target == GLOBAL_PROC) return call("/proc/[procname]")(arglist(arguments)) else if(target != world) + // monkestation start: anti-lag + if(isatom(target) && procname == "Shake") + var/confirmation = UNLINT(tgui_alert( + user = usr, + message = "Are you SURE you want to call Shake()?\nThis has a VERY HIGH CHANCE of causing immense lag or even a crash!", + title = "OH GOD WHY", + buttons = list("I'm sure!", "Nope."), + )) + if(confirmation != "I'm sure!") + return + // monkestation end return call(target, procname)(arglist(arguments)) else log_admin("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]")