aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/map/items/food_processor.gd4
-rw-r--r--client/map/items/item.gd2
-rw-r--r--client/map/items/pan.gd7
-rw-r--r--client/map/tiles/tile.gd2
4 files changed, 10 insertions, 5 deletions
diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd
index 05b783c1..38adf5aa 100644
--- a/client/map/items/food_processor.gd
+++ b/client/map/items/food_processor.gd
@@ -77,9 +77,7 @@ func progress(position_: float, speed: float, warn: bool):
func finish():
super()
- if sound_id != null:
- processing.emitting = false
- Sound.item_finished(sound_id)
+ processing.emitting = false
static func base_position() -> Vector3:
return Vector3(0., 0.4, 0.)
diff --git a/client/map/items/item.gd b/client/map/items/item.gd
index 2d801096..5c31d70f 100644
--- a/client/map/items/item.gd
+++ b/client/map/items/item.gd
@@ -79,6 +79,8 @@ func progress(position_: float, speed: float, warn: bool):
func finish():
progress_instance.visible = false
+ if sound_id != null:
+ Sound.item_finished(sound_id)
func setup_sounds():
take_sound.setup([preload("res://map/items/sounds/generic_take.ogg")])
diff --git a/client/map/items/pan.gd b/client/map/items/pan.gd
index 1aa80da0..bc858a6b 100644
--- a/client/map/items/pan.gd
+++ b/client/map/items/pan.gd
@@ -33,6 +33,13 @@ func progress(position_: float, speed: float, warn: bool):
steam.color = Color(.2, .2, .2)
else:
steam.color = Color(1.,1.,1.)
+ if sound_id == null:
+ sound_id = Sound.item_progress(
+ self,
+ preload("res://map/items/sounds/frying.ogg"),
+ null,
+ -5.
+ )
func finish():
super()
diff --git a/client/map/tiles/tile.gd b/client/map/tiles/tile.gd
index c5f75c57..2aac647a 100644
--- a/client/map/tiles/tile.gd
+++ b/client/map/tiles/tile.gd
@@ -60,8 +60,6 @@ func interact():
func progress(position_: float, speed: float, warn: bool, _acting_player):
if item != null:
item.progress(position_, speed, warn)
- if speed == 0.: finish()
-
func finish():
if item != null: