Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin Proc for Distress Signal TGUI and Fix #4175

Merged
merged 6 commits into from
Aug 17, 2023
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
else if(is_announcing == "No")
Ben10083 marked this conversation as resolved.
Show resolved Hide resolved
is_announcing = FALSE
Ben10083 marked this conversation as resolved.
Show resolved Hide resolved
else 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
else if(prompt == "Current Location")
Ben10083 marked this conversation as resolved.
Show resolved Hide resolved
override_spawn_loc = get_turf(usr)

chosen_ert.activate(is_announcing, override_spawn_loc)

Expand Down