aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/audio/sound.gd4
-rw-r--r--client/map/items/food_processor.gd3
2 files changed, 5 insertions, 2 deletions
diff --git a/client/audio/sound.gd b/client/audio/sound.gd
index c4ef0ad2..f0100756 100644
--- a/client/audio/sound.gd
+++ b/client/audio/sound.gd
@@ -18,15 +18,17 @@ func play_hover_maybe(element):
return
play_hover()
-func item_progress(item: Item, running: AudioStream, stopping: AudioStream) -> int:
+func item_progress(item: Item, running: AudioStream, stopping: AudioStream, volume=0.) -> int:
item_id += 1
var running_player: AudioStreamPlayer3D = AudioStreamPlayer3D.new()
running_player.stream = running
running_player.name = "Running%d" % item_id
+ running_player.volume_db = volume
add_child(running_player)
var stopping_player: AudioStreamPlayer3D = AudioStreamPlayer3D.new()
stopping_player.stream = stopping
stopping_player.name = "Stopping%d" % item_id
+ stopping_player.volume_db = volume
running_player.play()
add_child(stopping_player)
item_sounds[item_id] = [item, running_player, stopping_player, false]
diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd
index 588777ff..6a04da00 100644
--- a/client/map/items/food_processor.gd
+++ b/client/map/items/food_processor.gd
@@ -32,7 +32,8 @@ func progress(p: float, warn: bool):
sound_id = Sound.item_progress(
self,
preload("res://map/items/sounds/food_processor_running.ogg"),
- preload("res://map/items/sounds/food_processor_stopping.ogg")
+ preload("res://map/items/sounds/food_processor_stopping.ogg"),
+ -10.
)
func finish(warn: bool):