From c39ba57b20e45f24bfecc29045d9517f0ace0c1e Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Tue, 2 Jan 2024 02:25:35 +0000 Subject: [PATCH] Fixes xeno ERT distress beacon announcements (#5355) # About the pull request Fixes #5354 by flipping the result of the "Would you like to broadcast the beacon launch?" prompt. Basically the prompt was setting a variable as if `TRUE` == "Yes a broadcast should be launched", when it was actually `TRUE` == "No a broadcast shouldn't be launched". (The parameters on the `activate()` proc are pretty weird with one being positive and one negative, but I figured I'd just do the fix here rather than trying to refactor anything.) # Explain why it's good for the game Less MOOC announcements needed about ""bugs"" :P. # Testing Photographs and Procedure
Screenshots & Videos **Before:** https://github.com/cmss13-devs/cmss13/assets/57483089/12a8e585-e820-43c9-a9f4-22f250c3603a **After:** https://github.com/cmss13-devs/cmss13/assets/57483089/4bce0026-e7f9-4ac1-8eee-e7d2b6137921
# Changelog :cl: fix: Fixed custom xeno ERTs sending a distress beacon announcement when it shouldn't. /:cl: --- code/modules/admin/topic/topic_events.dm | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/code/modules/admin/topic/topic_events.dm b/code/modules/admin/topic/topic_events.dm index 0c37e81f2641..da8743d6dead 100644 --- a/code/modules/admin/topic/topic_events.dm +++ b/code/modules/admin/topic/topic_events.dm @@ -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") @@ -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)]") @@ -285,7 +286,7 @@ 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 @@ -293,19 +294,16 @@ 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)]") -