aboutsummaryrefslogtreecommitdiff
path: root/client/map/items/food_processor.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-04 22:12:02 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-04 22:12:02 +0200
commit5fab354d37476f7339975311a0fe4d5a559065db (patch)
treed58a10d24c66291237d1bc4dc026b86f490881bf /client/map/items/food_processor.gd
parentc646336dc3bf470d4185eec995d00a89c420127b (diff)
parent9ed1d51ad4abaa114da36e3284c8e29dd07855ad (diff)
downloadhurrycurry-5fab354d37476f7339975311a0fe4d5a559065db.tar
hurrycurry-5fab354d37476f7339975311a0fe4d5a559065db.tar.bz2
hurrycurry-5fab354d37476f7339975311a0fe4d5a559065db.tar.zst
Merge branch 'master' of codeberg.org:hurrycurry/hurrycurry
Diffstat (limited to 'client/map/items/food_processor.gd')
-rw-r--r--client/map/items/food_processor.gd17
1 files changed, 11 insertions, 6 deletions
diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd
index 66d78168..81886ae7 100644
--- a/client/map/items/food_processor.gd
+++ b/client/map/items/food_processor.gd
@@ -16,6 +16,7 @@
class_name FoodProcessor
extends Item
+var time := 0.
var processing: CPUParticles3D = load("res://map/items/processing.tscn").instantiate()
func _init(owned_by_: Node3D):
@@ -23,11 +24,15 @@ func _init(owned_by_: Node3D):
add_child(load("res://map/items/food_processor.tscn").instantiate())
add_child(processing)
-func progress(p: float, warn: bool):
- super(p, warn)
+func _process(delta: float):
+ super(delta)
+ time += delta
+ processing.rotation.y += time * TAU
+ base.rotation.y += time * TAU
+
+func progress(position_: float, speed: float, warn: bool):
+ super(position_, speed, warn)
processing.emitting = true
- processing.rotation.y += p * TAU
- base.rotation.y += p * TAU
if sound_id == null:
sound_id = Sound.item_progress(
self,
@@ -36,8 +41,8 @@ func progress(p: float, warn: bool):
-10.
)
-func finish(warn: bool):
- super(warn)
+func finish():
+ super()
if sound_id != null:
processing.emitting = false
Sound.item_finished(sound_id)