From 879296835e4e3c24bbce9021e00e76e01858d500 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 10:34:44 +0000 Subject: [PATCH] Fix: Subspace broadcast filters non-radio devices (#22539) * Please describe the intent of your changes in a clear fashion. Addresses an `undefined variable` error (`canhear_range`) occurring in `/proc/get_hearers_in_radio_ranges` when an `/obj/item/implant/explosive` was present in the list of devices. The root cause was identified in the `TRANSMISSION_SUBSPACE` path of `/datum/signal/subspace/vocal/broadcast()`. Previously, this path would copy all devices registered under `RADIO_CHAT` (which included the explosive implant) into the `radios` list. Although a subsequent loop attempted to filter out non-receivable devices, it would skip processing non-`/obj/item/radio` types but not remove them from the list. This meant the explosive implant, lacking a `canhear_range` variable, was still passed to `get_hearers_in_radio_ranges`, causing the crash when `radio.canhear_range` was accessed. The fix modifies the `TRANSMISSION_SUBSPACE` logic to explicitly build the `radios` list by iterating through `SSradio.get_devices` and only adding actual `/obj/item/radio` instances that are capable of receiving the signal. This ensures that `get_hearers_in_radio_ranges` only receives valid radio objects, preventing the `canhear_range` error and preserving the `as anything` keyword in the helper proc as it will now always receive a correctly typed list. * Please make sure that, in the case of mapping changes, you include images of these changes in the PR's description. * Please make sure to mark your PR as wip or review required by making a comment with !wip or !review required * If you include sprites/sounds/... (assets) that you have not created yourself specify the license and original author below. * Ensure that you also credit them in the appropriate location / changelog as specified in the contributor guidelines ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | icons/example.dmi | ExamplePerson (Example Station) | CC0 | Fixes SERVER-PROD-SR --------- Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com> Co-authored-by: VMSolidus --- .../structures/machinery/telecomms/broadcasting.dm | 8 +++----- html/changelogs/hellfirejag-explosive-implant-runtime.yml | 4 ++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 html/changelogs/hellfirejag-explosive-implant-runtime.yml diff --git a/code/game/objects/structures/machinery/telecomms/broadcasting.dm b/code/game/objects/structures/machinery/telecomms/broadcasting.dm index 64b37ce6f9b..271aaff621a 100644 --- a/code/game/objects/structures/machinery/telecomms/broadcasting.dm +++ b/code/game/objects/structures/machinery/telecomms/broadcasting.dm @@ -151,11 +151,9 @@ if (TRANSMISSION_SUBSPACE) // Reach any radios on the levels var/list/all_radios_of_our_frequency = SSradio.get_devices(frequency, RADIO_CHAT) - radios = all_radios_of_our_frequency.Copy() - - for (var/obj/item/radio/subspace_radio in radios) - if(!subspace_radio.can_receive(frequency, signal_reaches_every_z_level)) - radios -= subspace_radio + for (var/obj/item/radio/subspace_radio in all_radios_of_our_frequency) + if(subspace_radio.can_receive(frequency, signal_reaches_every_z_level)) + radios += subspace_radio // Cool antag radios can hear all Horizon comms for (var/antag_freq in list(SYND_FREQ, RAID_FREQ, NINJ_FREQ)) diff --git a/html/changelogs/hellfirejag-explosive-implant-runtime.yml b/html/changelogs/hellfirejag-explosive-implant-runtime.yml new file mode 100644 index 00000000000..12be4df3528 --- /dev/null +++ b/html/changelogs/hellfirejag-explosive-implant-runtime.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Fixed a runtime error caused by explosive implants lying about being a radio to the Radio Subsystem."