Skip to content

Commit

Permalink
Admin Proc for Distress Signal TGUI and Fix (#4175)
Browse files Browse the repository at this point in the history
# 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:
  • Loading branch information
Ben10083 authored Aug 17, 2023
1 parent 0fb51e8 commit 21b8180
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions code/modules/admin/tabs/event_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 21b8180

Please sign in to comment.