From 21b81800444580f79279935195d320da93ae5afb Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Thu, 17 Aug 2023 07:26:44 -0400 Subject: [PATCH] Admin Proc for Distress Signal TGUI and Fix (#4175) # About the pull request Readds functionality for silent ert (erts with no ARES announcements) and coverts some prompts to TGUI # Explain why it's good for the game TGUI pretty. Also helps event staff get reinforcements without notifying everyone ingame # Changelog :cl: fix: Prompt allowing staff to call for ERT with an announcement fixed to actually appear ui: Prompts for admin-calling ERT converted to TGUI. /:cl: --- code/modules/admin/tabs/event_tab.dm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index fdf70d314c21..32eaeb674b8d 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -218,21 +218,22 @@ if(!istype(chosen_ert)) return - var/is_announcing = TRUE - switch(alert(src, "Would you like to announce the distress beacon to the server population? This will reveal the distress beacon to all players.", "Announce distress beacon?", "Yes", "No", "Cancel")) - if("Cancel") - qdel(chosen_ert) - return - if("No") - is_announcing = FALSE + var/is_announcing = tgui_alert(usr, "Would you like to announce the distress beacon to the server population? This will reveal the distress beacon to all players.", "Announce distress beacon?", list("Yes", "No"), 20 SECONDS) + if(!is_announcing) + qdel(chosen_ert) + return + if(is_announcing == "No") + is_announcing = FALSE + if (is_announcing == "Yes") + is_announcing = TRUE var/turf/override_spawn_loc - switch(alert(usr, "Spawn at their assigned spawnpoints, or at your location?", "Spawnpoint Selection", "Assigned Spawnpoint", "Current Location", "Cancel")) - if("Cancel") - qdel(chosen_ert) - return - if("Current Location") - override_spawn_loc = get_turf(usr) + var/prompt = tgui_alert(usr, "Spawn at their assigned spawn, or at your location?", "Spawnpoint Selection", list("Spawn", "Current Location"), 0) + if(!prompt) + qdel(chosen_ert) + return + if(prompt == "Current Location") + override_spawn_loc = get_turf(usr) chosen_ert.activate(is_announcing, override_spawn_loc)