mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Overlays for notifying when radios are on broadcast [MDB IGNORE] (#17630)
* Overlays for notifying when radios are on broadcast (#71006) ## About The Pull Request Adds overlays for when the radios are on broadcast snd speaker Theres 4 overlay settings, an "idle" (broadcasting or speaker enabled) and "active" (flicked when recieving or sending a radio msg) ### SBR The base icon is the screen being off, and the bars are seperated into ovelays with the top one being broadcasting. The idle overlay displays the bar short, while the active will make the bars animate like the current animation) having both off will make the antenna go down since its "not being used" ### Intercoms Intercoms are simpler, just having lights on the speaker flash green if the corresponding mode is active ### Headsets Headsets are unaffected because of the small sprites. except miner and explo headsets where the antenna will go down if both are disabled bc its "not being used" ## Why It's Good For The Game Helps you tell whether somone (like ai) is spying, makes it easier to notice whether youee in broadcasting range of an intercom, and its a cool immersion thing to ""see"" the mic readings on a sbr ## Changelog 🆑 add: radios have overlays for showing broadcasting settings /🆑 Co-authored-by: candycanes <eastereggman@ nothing.com> Co-authored-by: etherware-novice <candy@ notarealaddr.com> Co-authored-by: Candycaneannihalator <candycane@ thisisnotarealaddr.com> Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> * Overlays for notifying when radios are on broadcast * SR sprite updates Co-authored-by: texan-down-under <73374039+etherware-novice@users.noreply.github.com> Co-authored-by: candycanes <eastereggman@ nothing.com> Co-authored-by: etherware-novice <candy@ notarealaddr.com> Co-authored-by: Candycaneannihalator <candycane@ thisisnotarealaddr.com> Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> Co-authored-by: tastyfish <crazychris32@gmail.com>
This commit is contained in:
co-authored by
candycanes
etherware-novice
Candycaneannihalator
Mothblocks
texan-down-under
tastyfish
parent
618a499dd4
commit
24fbd712a9
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 633 B After Width: | Height: | Size: 1018 B |
Binary file not shown.
|
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user