From fe35cc5927f873f7a3497d02a6389c9678a61a7f Mon Sep 17 00:00:00 2001 From: forest2001 <41653574+realforest2001@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:44:50 +0000 Subject: [PATCH] Forest Bugfix Bundle (#5127) # About the pull request Forest is stupid. # Explain why it's good for the game # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: Fixes custom sent ERTs broadcasting when they shouldn't. fix: Fixes UPP friendly ERT telling staff it's hostile. /:cl: --- code/datums/emergency_calls/emergency_call.dm | 2 +- code/modules/admin/tabs/event_tab.dm | 21 ++++++++--------- code/modules/admin/topic/topic_events.dm | 23 ++++++++----------- .../mob/living/carbon/human/inventory.dm | 2 ++ 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/code/datums/emergency_calls/emergency_call.dm b/code/datums/emergency_calls/emergency_call.dm index 9db46955a5ea..c6f71382b877 100644 --- a/code/datums/emergency_calls/emergency_call.dm +++ b/code/datums/emergency_calls/emergency_call.dm @@ -200,7 +200,7 @@ SSticker.mode.picked_calls += src show_join_message() //Show our potential candidates the message to let them join. - message_admins("Distress beacon: '[name]' activated [src.hostility? "[SPAN_WARNING("(THEY ARE HOSTILE)")]":"(they are friendly)"]. Looking for candidates.") + message_admins("Distress beacon: '[name]' activated [hostility? "[SPAN_WARNING("(THEY ARE HOSTILE)")]":"(they are friendly)"]. Looking for candidates.") if(!quiet_launch) marine_announcement("A distress beacon has been launched from the [MAIN_SHIP_NAME].", "Priority Alert", 'sound/AI/distressbeacon.ogg', logging = ARES_LOG_SECURITY) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index ff558c341c4b..6ae974d2faea 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -217,18 +217,15 @@ if(!istype(chosen_ert)) return - - 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/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/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 = 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 var/turf/override_spawn_loc var/prompt = tgui_alert(usr, "Spawn at their assigned spawn, or at your location?", "Spawnpoint Selection", list("Spawn", "Current Location"), 0) @@ -238,7 +235,7 @@ if(prompt == "Current Location") override_spawn_loc = get_turf(usr) - chosen_ert.activate(quiet_launch = launch_broadcast, announce_incoming = announce_receipt, override_spawn_loc = override_spawn_loc) + chosen_ert.activate(quiet_launch, announce_receipt, override_spawn_loc) message_admins("[key_name_admin(usr)] admin-called a [choice == "Randomize" ? "randomized ":""]distress beacon: [chosen_ert.name]") diff --git a/code/modules/admin/topic/topic_events.dm b/code/modules/admin/topic/topic_events.dm index 5e59ba4835f5..0c37e81f2641 100644 --- a/code/modules/admin/topic/topic_events.dm +++ b/code/modules/admin/topic/topic_events.dm @@ -205,20 +205,17 @@ em_call.mob_max = humans.len em_call.players_to_offer = humans 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/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/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 = 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) + 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)]") diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index b86a6a625f57..b54f03e2ce7d 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -550,6 +550,7 @@ to_chat(src, SPAN_WARNING("You can't put \the [interact_item.name] on [target_mob]!")) return visible_message(SPAN_NOTICE("[src] tries to put \the [interact_item.name] on [target_mob]."), null, null, 5) + log_interact(src, target_mob, "[key_name(src)] attempted to put [interact_item.name] on [key_name(target_mob)]'s ([slot_to_process]).") if(do_after(src, get_strip_delay(src, target_mob), INTERRUPT_ALL, BUSY_ICON_GENERIC, target_mob, INTERRUPT_MOVED, BUSY_ICON_GENERIC)) if(interact_item == get_active_hand() && !target_mob.get_item_by_slot(slot_to_process) && Adjacent(target_mob)) if(interact_item.flags_item & WIELDED) //to prevent re-wielding it during the do_after @@ -558,6 +559,7 @@ drop_inv_item_on_ground(interact_item) if(interact_item && !QDELETED(interact_item)) //Might be self-deleted? target_mob.equip_to_slot_if_possible(interact_item, slot_to_process, 1, 0, 1, 1) + log_interact(src, target_mob, "[key_name(src)] put [interact_item.name] on [key_name(target_mob)]'s ([slot_to_process]) successfully.") if(ishuman(target_mob) && target_mob.stat == DEAD) var/mob/living/carbon/human/human_target = target_mob human_target.disable_lights() // take that powergamers -spookydonut