mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user