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

Fixes xeno ERT distress beacon announcements #5355

Merged
merged 3 commits into from
Jan 2, 2024
Merged
Changes from all 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
24 changes: 11 additions & 13 deletions code/modules/admin/topic/topic_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
em_call.mob_max = humans.len
em_call.players_to_offer = humans
em_call.owner = owner

var/quiet_launch = TRUE
var/ql_prompt = tgui_alert(usr, "Would you like to broadcast the beacon launch? This will reveal the distress beacon to all players.", "Announce distress beacon?", list("Yes", "No"), 20 SECONDS)
if(ql_prompt == "Yes")
Expand All @@ -214,7 +215,7 @@
var/ar_prompt = tgui_alert(usr, "Would you like to announce the beacon received message? This will reveal the distress beacon to all players.", "Announce beacon received?", list("Yes", "No"), 20 SECONDS)
if(ar_prompt == "Yes")
announce_receipt = TRUE
log_debug("ERT DEBUG (CUSTOM SET): [quiet_launch] - [announce_receipt]")

em_call.activate(quiet_launch, announce_receipt)

message_admins("[key_name_admin(usr)] created [humans_to_spawn] humans as [job_name] at [get_area(initial_spot)]")
Expand Down Expand Up @@ -285,27 +286,24 @@

xenos += X

if (offer_as_ert)
if(offer_as_ert)
var/datum/emergency_call/custom/em_call = new()
var/name = input(usr, "Please name your ERT", "ERT Name", "Admin spawned xenos")
em_call.name = name
em_call.mob_max = xenos.len
em_call.players_to_offer = xenos
em_call.owner = owner

var/launch_broadcast = tgui_alert(usr, "Would you like to broadcast the beacon launch? This will reveal the distress beacon to all players.", "Announce distress beacon?", list("Yes", "No"), 20 SECONDS)
if(launch_broadcast == "Yes")
launch_broadcast = TRUE
else
launch_broadcast = FALSE
var/quiet_launch = TRUE
var/ql_prompt = tgui_alert(usr, "Would you like to broadcast the beacon launch? This will reveal the distress beacon to all players.", "Announce distress beacon?", list("Yes", "No"), 20 SECONDS)
if(ql_prompt == "Yes")
quiet_launch = FALSE

var/announce_receipt = tgui_alert(usr, "Would you like to announce the beacon received message? This will reveal the distress beacon to all players.", "Announce beacon received?", list("Yes", "No"), 20 SECONDS)
if(announce_receipt == "Yes")
var/announce_receipt = FALSE
var/ar_prompt = tgui_alert(usr, "Would you like to announce the beacon received message? This will reveal the distress beacon to all players.", "Announce beacon received?", list("Yes", "No"), 20 SECONDS)
if(ar_prompt == "Yes")
announce_receipt = TRUE
else
announce_receipt = FALSE

em_call.activate(launch_broadcast, announce_receipt)
em_call.activate(quiet_launch, announce_receipt)

message_admins("[key_name_admin(usr)] created [xenos_to_spawn] xenos as [xeno_caste] at [get_area(initial_spot)]")