Skip to content

Commit

Permalink
Forest Bugfix Bundle (#5127)
Browse files Browse the repository at this point in the history
# About the pull request
Forest is stupid.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: Fixes custom sent ERTs broadcasting when they shouldn't.
fix: Fixes UPP friendly ERT telling staff it's hostile.
/:cl:
  • Loading branch information
realforest2001 authored Dec 6, 2023
1 parent 8b69334 commit fe35cc5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 26 deletions.
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 9 additions & 12 deletions code/modules/admin/tabs/event_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]")

Expand Down
23 changes: 10 additions & 13 deletions code/modules/admin/topic/topic_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)]")

Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/human/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fe35cc5

Please sign in to comment.