From ef8d3f9c3631808e8c86a8024c3a1514eac28025 Mon Sep 17 00:00:00 2001 From: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:19:00 +0100 Subject: [PATCH] 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: --- 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