From e2cff9b3fadecf8fb8f084e0d415bcea79134c2d Mon Sep 17 00:00:00 2001 From: Rykka Stormheart <54187424+Rykka-Stormheart@users.noreply.github.com> Date: Sat, 29 Aug 2020 03:10:42 -0400 Subject: [PATCH] Adds Door Volume Channel (#7592) Adds Door Channel Volume preference for doors, that applies to open/close/bolts sounds. This should prevent complaints of "Doors are too loud" - adjust the volume channel to your personal preference. --- code/__defines/misc.dm | 4 ++++ code/game/machinery/doors/airlock.dm | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 32e1759ed4..b531b87871 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -373,13 +373,17 @@ var/global/list/##LIST_NAME = list();\ #define FONT_GIANT(X) "[X]" +// Volume Channel Defines + #define VOLUME_CHANNEL_MASTER "Master" #define VOLUME_CHANNEL_AMBIENCE "Ambience" #define VOLUME_CHANNEL_ALARMS "Alarms" +#define VOLUME_CHANNEL_DOORS "Doors" // Make sure you update this or clients won't be able to adjust the channel GLOBAL_LIST_INIT(all_volume_channels, list( VOLUME_CHANNEL_MASTER, VOLUME_CHANNEL_AMBIENCE, VOLUME_CHANNEL_ALARMS, + VOLUME_CHANNEL_DOORS, )) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 8ba63073f4..9e006d7095 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -73,7 +73,7 @@ if(do_after(user,5 SECONDS,src)) visible_message("\The [user] forces \the [src] open, sparks flying from its electronics!") src.do_animate("spark") - playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1) + playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS) src.locked = 0 src.welded = 0 update_icon() @@ -82,7 +82,7 @@ else if(src.density) visible_message("\The [user] begins forcing \the [src] open!") if(do_after(user, 5 SECONDS,src)) - playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1) + playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS) visible_message("\The [user] forces \the [src] open!") open(1) else @@ -1084,9 +1084,9 @@ About the new airlock wires panel: //if the door is unpowered then it doesn't make sense to hear the woosh of a pneumatic actuator if(arePowerSystemsOn()) - playsound(src, open_sound_powered, 50, 1) + playsound(src, open_sound_powered, 50, 1, volume_channel = VOLUME_CHANNEL_DOORS) else - playsound(src, open_sound_unpowered, 75, 1) + playsound(src, open_sound_unpowered, 75, 1, volume_channel = VOLUME_CHANNEL_DOORS) if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density) src.closeOther.close() @@ -1182,9 +1182,9 @@ About the new airlock wires panel: use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people has_beeped = 0 if(arePowerSystemsOn()) - playsound(src, close_sound_powered, 50, 1) + playsound(src, close_sound_powered, 50, 1, volume_channel = VOLUME_CHANNEL_DOORS) else - playsound(src, open_sound_unpowered, 75, 1) + playsound(src, open_sound_unpowered, 75, 1, volume_channel = VOLUME_CHANNEL_DOORS) for(var/turf/turf in locs) var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf) if(killthis) @@ -1199,7 +1199,7 @@ About the new airlock wires panel: if (operating && !forced) return 0 src.locked = 1 - playsound(src, bolt_down_sound, 30, 0, 3) + playsound(src, bolt_down_sound, 30, 0, 3, volume_channel = VOLUME_CHANNEL_DOORS) for(var/mob/M in range(1,src)) M.show_message("You hear a click from the bottom of the door.", 2) update_icon() @@ -1213,7 +1213,7 @@ About the new airlock wires panel: if(operating || !src.arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS)) return src.locked = 0 - playsound(src, bolt_up_sound, 30, 0, 3) + playsound(src, bolt_up_sound, 30, 0, 3, volume_channel = VOLUME_CHANNEL_DOORS) for(var/mob/M in range(1,src)) M.show_message("You hear a click from the bottom of the door.", 2) update_icon()