aboutsummaryrefslogtreecommitdiff
path: root/client/map/items/food_processor.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-03 16:55:14 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-03 16:55:14 +0200
commit095db9be074577c0b46fa0ba080bfbd4f37c8f83 (patch)
tree27efe2ecfe60f3a80a9e16e731b39f7fa59ad84c /client/map/items/food_processor.gd
parent074c37aae5b25844a9e85e89b30893042c9e6059 (diff)
parent872568d39a6e5e1334f02a384491b7645e65919d (diff)
downloadhurrycurry-095db9be074577c0b46fa0ba080bfbd4f37c8f83.tar
hurrycurry-095db9be074577c0b46fa0ba080bfbd4f37c8f83.tar.bz2
hurrycurry-095db9be074577c0b46fa0ba080bfbd4f37c8f83.tar.zst
Merge branch 'master' of https://codeberg.org/metamuffin/undercooked
Diffstat (limited to 'client/map/items/food_processor.gd')
-rw-r--r--client/map/items/food_processor.gd10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd
index f2226e5f..588777ff 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/sounds/food_processor_running.ogg"),
+ preload("res://map/items/sounds/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.)