diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index f018ea7bd18..4dfedcbe2a6 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -87,8 +87,11 @@ var/global/list/default_medbay_channels = list( /obj/item/device/radio/proc/set_frequency(new_frequency) SSradio.remove_object(src, frequency) - frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency, RADIO_CHAT) + if(new_frequency) + frequency = new_frequency + + if(listening && on) + radio_connection = SSradio.add_object(src, new_frequency, RADIO_CHAT) /obj/item/device/radio/Initialize() . = ..() @@ -138,9 +141,13 @@ var/global/list/default_medbay_channels = list( should_be_listening = listening if(listening && on) - SSradio.add_object(src, frequency, RADIO_CHAT) + for(var/channel_name in channels) + if(channels[channel_name]) + secure_radio_connections[channel_name] = SSradio.add_object(src, radiochannels[channel_name], RADIO_CHAT) + radio_connection = SSradio.add_object(src, frequency, RADIO_CHAT) else if(!listening) SSradio.remove_object_all(src) + radio_connection = null /** * setter for broadcasting that makes us not hearing sensitive if not broadcasting and hearing sensitive if broadcasting diff --git a/code/modules/heavy_vehicle/mech_life.dm b/code/modules/heavy_vehicle/mech_life.dm index 223962bf0e9..361a9612059 100644 --- a/code/modules/heavy_vehicle/mech_life.dm +++ b/code/modules/heavy_vehicle/mech_life.dm @@ -21,7 +21,9 @@ UNSETEMPTY(pilots) if(radio) - radio.set_on(head?.radio && head.radio.is_functional() && get_cell()) + var/radio_check = head?.radio && head.radio.is_functional() && get_cell() + if(radio.is_on() != radio_check) + radio.set_on(radio_check) if(camera) camera.status = (head?.camera && head.camera.is_functional()) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 6ac09290dbd..b06ff52c84f 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -135,10 +135,8 @@ uneq_all() if(common_radio) - if(!is_component_functioning("radio")) - common_radio.set_on(FALSE) - else - common_radio.set_on(TRUE) + if(common_radio.is_on() != is_component_functioning("radio")) + common_radio.set_on(!common_radio.is_on()) if(is_component_functioning("camera")) blinded = FALSE diff --git a/html/changelogs/johnwildkins-radiofix3.yml b/html/changelogs/johnwildkins-radiofix3.yml new file mode 100644 index 00000000000..86395fbdc84 --- /dev/null +++ b/html/changelogs/johnwildkins-radiofix3.yml @@ -0,0 +1,6 @@ +author: JohnWildkins + +delete-after: True + +changes: + - bugfix: "Fixed intercoms not respecting speaker on/off setting when switching channels."