Radio Sounds (#85115)

## About The Pull Request
Now talking into radio and hearing radio messages produces a sound.
Using LOUD-MODE makes a unique sound.


https://github.com/user-attachments/assets/891d9b9a-5313-4aac-9fef-56d0a7286bf1


https://github.com/user-attachments/assets/112a3587-46ea-413e-89e4-2da7b54c3d62

**YOU CAN DISABLE IT IN THE GAME PREFERENCES**
## Why It's Good For The Game
People REALLY tend to miss radio messages, especially from the heads.
This makes it so they can hear when some interesting or important
chatter is going on.

Unless all of the heads of staff decide to dispute in the Common,
subordinates will start noticing messages from their bosses in their
channels more often.

Also, these sounds are tickling my ears, in a good way.
## Changelog
🆑 DrDiasyl aka DrTuxedo
sound: Hearing and talking into the radio now produces a sound. Heads
get a special sound.
/🆑
This commit is contained in:
DrTuxedo
2024-07-27 21:33:28 +02:00
committed by GitHub
parent ec17e6fb6d
commit 277e57683e
8 changed files with 42 additions and 3 deletions
@@ -78,7 +78,7 @@
datum/language/language, // the language of the message
message, // the text content of the message
spans, // the list of spans applied to the message
list/message_mods // the list of modification applied to the message. Whispering, singing, ect
list/message_mods, // the list of modification applied to the message. Whispering, singing, ect
)
src.source = source
src.frequency = frequency
@@ -92,7 +92,7 @@
"compression" = rand(COMPRESSION_VOCAL_SIGNAL_MIN, COMPRESSION_VOCAL_SIGNAL_MAX),
"language" = lang_instance.name,
"spans" = spans,
"mods" = message_mods
"mods" = message_mods,
)
levels = SSmapping.get_connected_levels(get_turf(source))
@@ -351,6 +351,12 @@
signal.broadcast()
return
if(iscarbon(talking_movable))
var/mob/living/carbon/talking_carbon = talking_movable
if(talking_carbon.client?.prefs.read_preference(/datum/preference/toggle/radio_noise))
SEND_SOUND(talking_carbon, 'sound/misc/radio_talk.ogg')
// All radios make an attempt to use the subspace system first
signal.send_to_receivers()
@@ -422,6 +428,16 @@
SEND_SIGNAL(src, COMSIG_RADIO_RECEIVE_MESSAGE, data)
flick_overlay_view(overlay_speaker_active, 5 SECONDS)
if(iscarbon(loc))
var/mob/living/carbon/holder = loc
if(!holder.client?.prefs.read_preference(/datum/preference/toggle/radio_noise))
return
var/list/spans = data["spans"]
SEND_SOUND(holder, 'sound/misc/radio_receive.ogg')
if(SPAN_COMMAND in spans)
SEND_SOUND(holder, 'sound/misc/radio_important.ogg')
/obj/item/radio/ui_state(mob/user)
return GLOB.inventory_state
@@ -116,3 +116,9 @@
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_elevator"
savefile_identifier = PREFERENCE_PLAYER
/// Controls hearing radio noise
/datum/preference/toggle/radio_noise
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_radio_noise"
savefile_identifier = PREFERENCE_PLAYER
+10 -1
View File
@@ -5,4 +5,13 @@ knuckles.ogg by CGEffex. Shortened and cut.
https://freesound.org/people/CGEffex/sounds/93981/
airraid.ogg by Jwade722. Shortened and cut.
https://freesound.org/people/Jwade722/sounds/534550/
https://freesound.org/people/Jwade722/sounds/534550/
radio_talk.ogg by cs2975871. Shortened and cut.
https://freesound.org/people/cs2975871/sounds/514185/
radio_important.ogg by morganpurkis.
https://freesound.org/people/morganpurkis/sounds/392972/
radio_receive.ogg by JovianSounds. Shortened and cut.
https://freesound.org/people/JovianSounds/sounds/524205/
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -108,3 +108,11 @@ export const sound_achievement: FeatureChoiced = {
`,
component: FeatureDropdownInput,
};
export const sound_radio_noise: FeatureToggle = {
name: 'Enable radio noise',
category: 'SOUND',
description:
'When enabled, hear sounds of talking and hearing radio chatter.',
component: CheckboxInput,
};