diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 2d8535bd220..0ce0d87807f 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -73,8 +73,9 @@ #define ASFX_VOX 8 #define ASFX_DROPSOUND 16 #define ASFX_ARCADE 32 +#define ASFX_RADIO 64 -#define ASFX_DEFAULT (ASFX_AMBIENCE|ASFX_FOOTSTEPS|ASFX_VOTE|ASFX_VOX|ASFX_DROPSOUND|ASFX_ARCADE) +#define ASFX_DEFAULT (ASFX_AMBIENCE|ASFX_FOOTSTEPS|ASFX_VOTE|ASFX_VOX|ASFX_DROPSOUND|ASFX_ARCADE|ASFX_RADIO) // For secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list of humans. #define HEALTH_HUD 1 // A simple line reading the pulse. diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index 6fa6eb85a98..0d75da62b19 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -268,6 +268,14 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept if(R.receive_range(display_freq, level) > -1) radios += R + // --- Radio sounds. --- + + for(var/obj/item/device/radio/R in radios) + if((R.last_radio_sound + 1 SECOND) < world.time && R != radio) + playsound(R.loc, 'sound/effects/radio_chatter.ogg', 2.5, 0, -6, required_asfx_toggles = ASFX_RADIO) + R.last_radio_sound = world.time + + // Get a list of mobs who can hear from the radios we collected. var/list/receive = get_mobs_in_radio_ranges(radios) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 546f51b3525..c1ea8fae7ae 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -52,6 +52,7 @@ var/global/list/default_medbay_channels = list( var/obj/item/cell/cell = /obj/item/cell/device + var/last_radio_sound = -INFINITY /obj/item/device/radio var/datum/radio_frequency/radio_connection @@ -312,6 +313,9 @@ var/global/list/default_medbay_channels = list( if(!radio_connection) set_frequency(frequency) + if(loc == M) + playsound(loc, 'sound/effects/walkietalkie.ogg', 5, 0, -1, required_asfx_toggles = ASFX_RADIO) + /* Quick introduction: This new radio system uses a very robust FTL signaling technology unoriginally dubbed "subspace" which is somewhat similar to 'blue-space' but can't diff --git a/code/modules/client/preferences_ambience.dm b/code/modules/client/preferences_ambience.dm index 34e8e38d0ea..7dd4b4e2453 100644 --- a/code/modules/client/preferences_ambience.dm +++ b/code/modules/client/preferences_ambience.dm @@ -4,7 +4,8 @@ /client/proc/Toggle_asfx_vote, /client/proc/toggle_vox_voice, /client/proc/Toggle_dropsounds, - /client/proc/Toggle_arcadesounds + /client/proc/Toggle_arcadesounds, + /client/proc/Toggle_radiosounds ) /client/verb/asf_toggle() @@ -86,4 +87,16 @@ if(prefs.asfx_togs & ASFX_ARCADE) to_chat(src, "You will now hear arcade sounds.") else - to_chat(src, "You will no longer hear arcade sounds.") \ No newline at end of file + to_chat(src, "You will no longer hear arcade sounds.") + +/client/proc/Toggle_radiosounds() + set name = "Toggle Radio SFX" + set category = "SoundFx Prefs" + set desc = "Toggles hearing noises made by radios." + + prefs.asfx_togs ^= ASFX_RADIO + prefs.save_preferences() + if(prefs.asfx_togs & ASFX_RADIO) + to_chat(src, "You will now hear radio sounds.") + else + to_chat(src, "You will no longer hear radio sounds.") \ No newline at end of file diff --git a/html/changelogs/wezzy-radio_sounds_rewind.yml b/html/changelogs/wezzy-radio_sounds_rewind.yml new file mode 100644 index 00000000000..37d376b7b75 --- /dev/null +++ b/html/changelogs/wezzy-radio_sounds_rewind.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Wowzewow (Wezzy) + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Re-adds radio sounds. They should be working properly this time." diff --git a/sound/effects/radio1.ogg b/sound/effects/radio1.ogg deleted file mode 100644 index 29d08d4c7f9..00000000000 Binary files a/sound/effects/radio1.ogg and /dev/null differ diff --git a/sound/effects/radio2.ogg b/sound/effects/radio2.ogg deleted file mode 100644 index 5784abd5141..00000000000 Binary files a/sound/effects/radio2.ogg and /dev/null differ diff --git a/sound/effects/radio3.ogg b/sound/effects/radio3.ogg deleted file mode 100644 index ad4eb36a0f8..00000000000 Binary files a/sound/effects/radio3.ogg and /dev/null differ diff --git a/sound/effects/radio4.ogg b/sound/effects/radio4.ogg deleted file mode 100644 index 0d533ffeef5..00000000000 Binary files a/sound/effects/radio4.ogg and /dev/null differ diff --git a/sound/effects/radio_chatter.ogg b/sound/effects/radio_chatter.ogg index 395980cf676..6e5b3ecfbfe 100644 Binary files a/sound/effects/radio_chatter.ogg and b/sound/effects/radio_chatter.ogg differ diff --git a/sound/effects/walkietalkie.ogg b/sound/effects/walkietalkie.ogg new file mode 100644 index 00000000000..405391b44fc Binary files /dev/null and b/sound/effects/walkietalkie.ogg differ