diff options
Diffstat (limited to 'client/map/items/food_processor.gd')
| -rw-r--r-- | client/map/items/food_processor.gd | 17 | 
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) | 
