From 6f01701b92ed871a81579865d71e8698a420697b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 1 Apr 2023 22:12:28 +0200 Subject: [PATCH] [MIRROR] Highlander will not be activated if admins exit the highlander delay window. [MDB IGNORE] (#20250) * Highlander will not be activated if admins exit the highlander delay window. (#74400) ## About The Pull Request Starting highlander as an admin prompts admins if they want it to start with or without a warning. If you exit the window it treats it as if you selected the 40 second warning. This makes it so admins can now cancel out of this window. ## Why It's Good For The Game Sometime, somewhere and admin is going to accidently click this button and be unable to stop the unintended incoming highlander round. This should prevent this. ## Changelog :cl: admin: Exiting the highlander delay window without selecting an option will no longer start highlander mode. /:cl: * Highlander will not be activated if admins exit the highlander delay window. --------- Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com> --- code/modules/admin/verbs/secrets.dm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index d867d06f035..dc9288af598 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -43,6 +43,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller) return data #define THUNDERDOME_TEMPLATE_FILE "admin_thunderdome.dmm" +#define HIGHLANDER_DELAY_TEXT "40 seconds (crush the hope of a normal shift)" /datum/secrets_menu/ui_act(action, params) . = ..() if(.) @@ -260,11 +261,14 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller) if("onlyone") if(!is_funmin) return - var/response = tgui_alert(usr,"Delay by 40 seconds?", "There can, in fact, only be one", list("Instant!", "40 seconds (crush the hope of a normal shift)")) - if(response == "Instant!") - holder.only_one() - else - holder.only_one_delayed() + var/response = tgui_alert(usr,"Delay by 40 seconds?", "There can, in fact, only be one", list("Instant!", HIGHLANDER_DELAY_TEXT)) + switch(response) + if("Instant!") + holder.only_one() + if(HIGHLANDER_DELAY_TEXT) + holder.only_one_delayed() + else + return SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("There Can Be Only One")) if("guns") if(!is_funmin) @@ -588,6 +592,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller) if(holder) log_admin("[key_name(holder)] used secret [action]") #undef THUNDERDOME_TEMPLATE_FILE +#undef HIGHLANDER_DELAY_TEXT /proc/portalAnnounce(announcement, playlightning) set waitfor = FALSE