diff --git a/code/game/machinery/telecomms/broadcasting.dm b/code/game/machinery/telecomms/broadcasting.dm index 5887c776675..2c31dcbd989 100644 --- a/code/game/machinery/telecomms/broadcasting.dm +++ b/code/game/machinery/telecomms/broadcasting.dm @@ -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)) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index d515929c197..373db4b21f5 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -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 diff --git a/code/modules/client/preferences/sounds.dm b/code/modules/client/preferences/sounds.dm index f1778405665..4a0298132c2 100644 --- a/code/modules/client/preferences/sounds.dm +++ b/code/modules/client/preferences/sounds.dm @@ -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 diff --git a/sound/misc/license.txt b/sound/misc/license.txt index 69ef2992820..761a031d190 100644 --- a/sound/misc/license.txt +++ b/sound/misc/license.txt @@ -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/ \ No newline at end of file +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/ \ No newline at end of file diff --git a/sound/misc/radio_important.ogg b/sound/misc/radio_important.ogg new file mode 100644 index 00000000000..bb6f769d612 Binary files /dev/null and b/sound/misc/radio_important.ogg differ diff --git a/sound/misc/radio_receive.ogg b/sound/misc/radio_receive.ogg new file mode 100644 index 00000000000..6b2ee1ba4ef Binary files /dev/null and b/sound/misc/radio_receive.ogg differ diff --git a/sound/misc/radio_talk.ogg b/sound/misc/radio_talk.ogg new file mode 100644 index 00000000000..50d14c897a0 Binary files /dev/null and b/sound/misc/radio_talk.ogg differ diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/sounds.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/sounds.tsx index 6f0f81237e4..f190f6c2387 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/sounds.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/sounds.tsx @@ -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, +};