diff --git a/code/game/machinery/telecomms/broadcasting.dm b/code/game/machinery/telecomms/broadcasting.dm index 45e296aa8da..50dc4af8c9e 100644 --- a/code/game/machinery/telecomms/broadcasting.dm +++ b/code/game/machinery/telecomms/broadcasting.dm @@ -176,6 +176,9 @@ if(independent_radio.independent && independent_radio.can_receive(frequency, signal_reaches_every_z_level)) radios += independent_radio + for(var/obj/item/radio/called_radio as anything in radios) + called_radio.on_recieve_message() + // From the list of radios, find all mobs who can hear those. var/list/receive = get_hearers_in_radio_ranges(radios) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 7c9ac016c39..d176ad87478 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -37,6 +37,12 @@ GLOBAL_LIST_INIT(channel_tokens, list( /// A list of all languages that this headset allows the user to understand. Populated by language encryption keys. var/list/language_list + // headset is too small to display overlays + overlay_speaker_idle = null + overlay_speaker_active = null + overlay_mic_idle = null + overlay_mic_active = null + /obj/item/radio/headset/suicide_act(mob/living/carbon/user) user.visible_message(span_suicide("[user] begins putting \the [src]'s antenna up [user.p_their()] nose! It looks like [user.p_theyre()] trying to give [user.p_them()]self cancer!")) return TOXLOSS @@ -270,6 +276,9 @@ GLOBAL_LIST_INIT(channel_tokens, list( name = "mining radio headset" desc = "Headset used by shaft miners." icon_state = "mine_headset" + // "puts the antenna down" while the headset is off + overlay_speaker_idle = "headset_up" + overlay_mic_idle = "headset_up" keyslot = /obj/item/encryptionkey/headset_mining /obj/item/radio/headset/headset_srv diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index dc39e7dbecd..2685666175e 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -8,6 +8,12 @@ dog_fashion = null unscrewed = FALSE + overlay_speaker_idle = "intercom_s" + overlay_speaker_active = "intercom_recieve" + + overlay_mic_idle = "intercom_m" + overlay_mic_active = null + /obj/item/radio/intercom/unscrewed unscrewed = TRUE diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 933c05c014a..277f55d3ab2 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -74,6 +74,16 @@ /// associative list of the encrypted radio channels this radio can listen/broadcast to, of the form: list(channel name = channel frequency) var/list/secure_radio_connections + /// overlay when speaker is on + var/overlay_speaker_idle = "s_idle" + /// overlay when recieving a message + var/overlay_speaker_active = "s_active" + + /// overlay when mic is on + var/overlay_mic_idle = "m_idle" + /// overlay when speaking a message (is displayed simultaniously with speaker_active) + var/overlay_mic_active = "m_active" + /obj/item/radio/Initialize(mapload) wires = new /datum/wires/radio(src) secure_radio_connections = list() @@ -190,6 +200,7 @@ readd_listening_radio_channels() else if(!listening) remove_radio_all(src) + update_icon() /** * setter for broadcasting that makes us not hearing sensitive if not broadcasting and hearing sensitive if broadcasting @@ -208,6 +219,7 @@ become_hearing_sensitive(INNATE_TRAIT) else if(!broadcasting) lose_hearing_sensitivity(INNATE_TRAIT) + update_icon() ///setter for the on var that sets both broadcasting and listening to off or whatever they were supposed to be /obj/item/radio/proc/set_on(new_on) @@ -247,6 +259,8 @@ if(use_command) spans |= SPAN_COMMAND + flick_overlay_view(overlay_mic_active, 5 SECONDS) + /* Roughly speaking, radios attempt to make a subspace transmission (which is received, processed, and rebroadcast by the telecomms satellite) and @@ -351,6 +365,9 @@ return TRUE return FALSE +/obj/item/radio/proc/on_recieve_message() + flick_overlay_view(overlay_speaker_active, 5 SECONDS) + /obj/item/radio/ui_state(mob/user) return GLOB.inventory_state @@ -440,6 +457,15 @@ else . += span_notice("It cannot be modified or attached.") +/obj/item/radio/update_overlays() + . = ..() + if(unscrewed) + return + if(broadcasting) + . += overlay_mic_idle + if(listening) + . += overlay_speaker_idle + /obj/item/radio/screwdriver_act(mob/living/user, obj/item/tool) add_fingerprint(user) unscrewed = !unscrewed diff --git a/icons/obj/radio.dmi b/icons/obj/radio.dmi index 8690926cb04..88dbdbcc1a5 100644 Binary files a/icons/obj/radio.dmi and b/icons/obj/radio.dmi differ diff --git a/modular_skyrat/modules/aesthetics/intercom/icons/intercom.dmi b/modular_skyrat/modules/aesthetics/intercom/icons/intercom.dmi index b5c39c3f1a3..c135b858ad7 100644 Binary files a/modular_skyrat/modules/aesthetics/intercom/icons/intercom.dmi and b/modular_skyrat/modules/aesthetics/intercom/icons/intercom.dmi differ diff --git a/modular_skyrat/modules/blueshield/icons/radio.dmi b/modular_skyrat/modules/blueshield/icons/radio.dmi index 966ee905633..94581e4346f 100644 Binary files a/modular_skyrat/modules/blueshield/icons/radio.dmi and b/modular_skyrat/modules/blueshield/icons/radio.dmi differ