From df1376b117a9f7d82f7de5a6a33aa3e2e27972c1 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 29 Dec 2022 08:26:47 +0100 Subject: [PATCH] [MIRROR] Reset Thunderdome Respects Closing The Alert (bonus qol) [MDB IGNORE] (#18234) * Reset Thunderdome Respects Closing The Alert (bonus qol) (#72028) Similar vein to #70449. ## About The Pull Request I was training an admin yesterday, and they accidentally reset the thunderdome when they tried to cancel out of it by closing out of it since they didn't hit the "cancel" button, but rather the big red X. That's silly, let's have this respect that potential user entry. Also, the log_admin call here had an excessive number of arguments? Probably cruft that never got cleaned up, I just patched it up while I was in the area. I also changed the name of the title to not be so vague. ## Why It's Good For The Game Better UX is always a good thing. It's silly to have this happen more than once. ## Changelog :cl: admin: The "Reset Thunderdome" option in the Secrets Menu now respects you closing out of the confirmation screen as a way of cancelling your potential thunderdome reset, rather than proceeding immediately. It should also be easier to comprehend as well. /:cl: * Reset Thunderdome Respects Closing The Alert (bonus qol) Co-authored-by: san7890 --- code/modules/admin/verbs/secrets.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index f8b45c2e9a8..5c6a702e84a 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -126,12 +126,12 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller) toggle_id_ctf(holder, "centcom") if("tdomereset") - var/delete_mobs = tgui_alert(usr,"Clear all mobs?","Confirm",list("Yes","No","Cancel")) - if(delete_mobs == "Cancel") + var/delete_mobs = tgui_alert(usr, "Clear all mobs?", "Thunderdome Reset", list("Yes", "No", "Cancel")) + if(!delete_mobs || delete_mobs == "Cancel") return - log_admin("[key_name(holder)] reset the thunderdome to default with delete_mobs==[delete_mobs].", 1) - message_admins(span_adminnotice("[key_name_admin(holder)] reset the thunderdome to default with delete_mobs==[delete_mobs].")) + log_admin("[key_name(holder)] reset the thunderdome to default with delete_mobs marked as [delete_mobs].") + message_admins(span_adminnotice("[key_name_admin(holder)] reset the thunderdome to default with delete_mobs marked as [delete_mobs].")) var/area/thunderdome = GLOB.areas_by_type[/area/centcom/tdome/arena] if(delete_mobs == "Yes") @@ -144,6 +144,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller) var/datum/map_template/thunderdome_template = SSmapping.map_templates[THUNDERDOME_TEMPLATE_FILE] var/turf/thunderdome_corner = locate(thunderdome.x - 3, thunderdome.y - 1, 1) // have to do a little bit of coord manipulation to get it in the right spot thunderdome_template.load(thunderdome_corner) + if("set_name") var/new_name = input(holder, "Please input a new name for the station.", "What?", "") as text|null if(!new_name)