diff --git a/code/__DEFINES/sound_defines.dm b/code/__DEFINES/sound_defines.dm index 32b0adaac30..0aa85d3ccd9 100644 --- a/code/__DEFINES/sound_defines.dm +++ b/code/__DEFINES/sound_defines.dm @@ -9,6 +9,7 @@ #define CHANNEL_ENGINE 1017 // Engine ambient sounds #define CHANNEL_FIREALARM 1016 //fire alarm alarms #define CHANNEL_ASH_STORM 1015 +#define CHANNEL_RADIO_NOISE 1014 // radio headset noise #define USER_VOLUME(M, C) M?.client?.prefs.get_channel_volume(C) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 4546b727483..16b238049a1 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -2052,6 +2052,8 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) return "Fire Alarms" if(CHANNEL_ASH_STORM) return "Ash Storms" + if(CHANNEL_RADIO_NOISE) + return "Radio Noise" /proc/slot_bitfield_to_slot(input_slot_flags) // Kill off this garbage ASAP; slot flags and clothing flags should be IDENTICAL. GOSH DARN IT. Doesn't work with ears or pockets, either. switch(input_slot_flags) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 81667bc10fe..c627d12d351 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -88,6 +88,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts "1017" = 100, // CHANNEL_ENGINE "1016" = 100, // CHANNEL_FIREALARM "1015" = 100, // CHANNEL_ASH_STORM + "1014" = 100, // CHANNEL_RADIO_NOISE ) /// The volume mixer save timer handle. Used to debounce the DB call to save, to avoid spamming. var/volume_mixer_saving = null diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm index 82ad925fe24..b38ef5137b3 100644 --- a/code/modules/mob/living/living_say.dm +++ b/code/modules/mob/living/living_say.dm @@ -211,8 +211,13 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) message_range = first_piece.speaking.get_talkinto_msg_range(message) var/msg - if(!first_piece.speaking || !(first_piece.speaking.flags & NO_TALK_MSG)) + if((!first_piece.speaking || !(first_piece.speaking.flags & NO_TALK_MSG)) && client) msg = "[src] talks into [used_radios[1]]" + var/static/list/special_radio_channels = list("Syndicate", "SyndTeam", "Security", "Procedure", "Command", "Response Team", "Special Ops") + if(message_mode in special_radio_channels) + SEND_SOUND(src, sound('sound/items/radio_security.ogg', volume = rand(4, 16) * 5 * client.prefs.get_channel_volume(CHANNEL_RADIO_NOISE), channel = CHANNEL_RADIO_NOISE)) + else + SEND_SOUND(src, sound('sound/items/radio_common.ogg', volume = rand(4, 16) * 5 * client.prefs.get_channel_volume(CHANNEL_RADIO_NOISE), channel = CHANNEL_RADIO_NOISE)) if(msg) for(var/mob/living/M in hearers(5, src) - src) diff --git a/sound/items/radio_common.ogg b/sound/items/radio_common.ogg new file mode 100644 index 00000000000..20a1d1da0a0 Binary files /dev/null and b/sound/items/radio_common.ogg differ diff --git a/sound/items/radio_security.ogg b/sound/items/radio_security.ogg new file mode 100644 index 00000000000..e905d018a81 Binary files /dev/null and b/sound/items/radio_security.ogg differ