From 11d2b799739d6e4a0fa7496a74cf10bff925b6ea Mon Sep 17 00:00:00 2001 From: nokoe Date: Wed, 3 Jul 2024 15:04:02 +0200 Subject: add progress sound --- client/map/items/food_processor.gd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'client/map/items/food_processor.gd') diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd index f2226e5f..006954ef 100644 --- a/client/map/items/food_processor.gd +++ b/client/map/items/food_processor.gd @@ -28,10 +28,18 @@ func progress(p: float, warn: bool): processing.emitting = true processing.rotation.y += p * TAU base.rotation.y += p * TAU + if sound_id == null: + sound_id = Sound.item_progress( + self, + preload("res://map/items/food_processor_running.ogg"), + preload("res://map/items/food_processor_stopping.ogg") + ) func finish(warn: bool): super(warn) - processing.emitting = false + if sound_id != null: + processing.emitting = false + Sound.item_finished(sound_id) static func base_position() -> Vector3: return Vector3(0., 0.4, 0.) -- cgit v1.2.3-70-g09d2