Adds more sounds to moisture traps (#94660)

## About The Pull Request

Primarily adds a loop to moisture traps which is mostly silence,
interrupted by the solemn sound of a water droplet falling. Just like
the sprite be doing, y'know?
I decided to make it a simple loop, instead of doing a little extra and
setting that sprite animation up to play only when the sound effect
plays, as I'd have to make moisture traps process to call `flick` - and
I wasn't sure if that's worth it.
The sound effect is from:
https://freesound.org/people/mattfinarelli/sounds/533146/

## Why It's Good For The Game

Adds just a drop of ambience to the maintenance shafts.

## Changelog
🆑
sound: Added more atmospheric sounds to moisture traps
/🆑
This commit is contained in:
theOOZ
2026-01-02 17:08:45 +00:00
committed by GitHub
parent c3d61b74c6
commit 83bafb95af
5 changed files with 19 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
/// sound of a lone droplet hitting the water every once in a while like a broken faucet. used by moisture traps
/datum/looping_sound/drip
mid_sounds = 'sound/effects/droplet.ogg'
mid_length = 30 SECONDS
mid_length_vary = 15 SECONDS
volume = 45
vary = TRUE
ignore_walls = FALSE
falloff_distance = 5
@@ -11,6 +11,8 @@ at the cost of risking a vicious bite.**/
var/obj/item/hidden_item
///This var determines if there is a chance to receive a bite when sticking your hand into the water.
var/critter_infested = TRUE
///A subtle loop which plays a drop of water sound every once in a while
var/datum/looping_sound/drip/drip_sfx
///weighted loot table for what loot you can find inside the moisture trap.
///the actual loot isn't that great and should probably be improved and expanded later.
var/static/list/loot_table = list(
@@ -45,11 +47,14 @@ at the cost of risking a vicious bite.**/
fish_source.fish_table[picked_item] = 5
fish_source.fish_counts[picked_item] = 1;
AddComponent(/datum/component/fishing_spot, fish_source)
drip_sfx = new(src)
drip_sfx.start()
/obj/structure/moisture_trap/Destroy()
if(hidden_item)
QDEL_NULL(hidden_item)
drip_sfx?.stop(TRUE)
return ..()
@@ -71,6 +76,7 @@ at the cost of risking a vicious bite.**/
to_chat(user, span_warning("You need to lie down to reach into [src]."))
return
to_chat(user, span_notice("You reach down into the cold water of the basin."))
playsound(src,'sound/effects/submerge.ogg', 25, TRUE)
if(!do_after(user, 2 SECONDS, target = src))
return
if(hidden_item)
@@ -109,6 +115,7 @@ at the cost of risking a vicious bite.**/
return
hidden_item = I
to_chat(user, span_notice("You hide [I] inside the basin."))
playsound(src,'sound/effects/splash.ogg', 55, TRUE)
#define ALTAR_INACTIVE 0
#define ALTAR_STAGEONE 1
+2
View File
@@ -241,3 +241,5 @@ sound/mobs/non-humanoids/roro/roro_warble.ogg -- Made by cutting, adjusting pitc
sound/effects/goresplat.ogg -- https://freesound.org/people/ThefitzyG/sounds/414296/ -- License: Creative Commons 0
sound/music/antag/blobalert.ogg and sound/effects/blob/blobattack.ogg -- "SlimeAtk.WAV" by Jamius -- https://freesound.org/people/Jamius/sounds/41530/ -- License: Attribution 4.0
sound/effect/droplet.ogg -- "Drop - Water" By mattfinarelli -- https://freesound.org/people/mattfinarelli/sounds/533146/ -- License: Creative Commons 0
Binary file not shown.
+1
View File
@@ -1755,6 +1755,7 @@
#include "code\datums\looping_sounds\changeling_absorb.dm"
#include "code\datums\looping_sounds\choking.dm"
#include "code\datums\looping_sounds\cyborg.dm"
#include "code\datums\looping_sounds\drip.dm"
#include "code\datums\looping_sounds\item_sounds.dm"
#include "code\datums\looping_sounds\machinery_sounds.dm"
#include "code\datums\looping_sounds\music.dm"