diff options
Diffstat (limited to 'client/map/items')
-rw-r--r-- | client/map/items/bread.gd | 4 | ||||
-rw-r--r-- | client/map/items/food_processor.gd | 9 | ||||
-rw-r--r-- | client/map/items/item.gd | 11 | ||||
-rw-r--r-- | client/map/items/pot.gd | 4 | ||||
-rw-r--r-- | client/map/items/pot_items.gd | 4 | ||||
-rw-r--r-- | client/map/items/strawberry.gd | 4 | ||||
-rw-r--r-- | client/map/items/tomato.gd | 4 |
7 files changed, 21 insertions, 19 deletions
diff --git a/client/map/items/bread.gd b/client/map/items/bread.gd index b5143c53..d869aeb1 100644 --- a/client/map/items/bread.gd +++ b/client/map/items/bread.gd @@ -25,8 +25,8 @@ func _init(owned_by_: Node3D): steam.color = Color(.6, .6, .6, .4) base.add_child(steam) -func progress(p: float, warn: bool): - super(p, warn) +func progress(position_: float, speed: float, warn: bool): + super(position_, speed, warn) steam.emitting = warn func finish(warn: bool): diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd index 66d78168..ad4a6349 100644 --- a/client/map/items/food_processor.gd +++ b/client/map/items/food_processor.gd @@ -23,11 +23,12 @@ 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 progress(position_: float, speed: float, warn: bool): + super(position_, speed, warn) processing.emitting = true - processing.rotation.y += p * TAU - base.rotation.y += p * TAU + # TODO: Fix animation + # processing.rotation.y += p * TAU + # base.rotation.y += p * TAU if sound_id == null: sound_id = Sound.item_progress( self, diff --git a/client/map/items/item.gd b/client/map/items/item.gd index 2d046700..e67edcca 100644 --- a/client/map/items/item.gd +++ b/client/map/items/item.gd @@ -50,12 +50,13 @@ func _process(delta): if p: rotation.y = G.interpolate_angle(rotation.y, owned_by.global_rotation.y, delta * ispeed) else: rotation.y = G.interpolate_angle_closest_quarter(rotation.y, owned_by.global_rotation.y, delta * ispeed) -func progress(p: float, warn: bool): +func progress(position_: float, speed: float, warn: bool): progress_instance.visible = true - progress_instance.set_progress(p, warn) - # this shoukd be removed when the server is fixed - if p >= 1.: - finish(warn) + progress_instance.update(position_, speed, warn) + + # TODO: Fix finish + # if p >= 1.: + # finish(warn) func finish(_warn: bool): progress_instance.visible = false diff --git a/client/map/items/pot.gd b/client/map/items/pot.gd index dd5a6c6f..7a4fe40b 100644 --- a/client/map/items/pot.gd +++ b/client/map/items/pot.gd @@ -23,8 +23,8 @@ func _init(owned_by_: Node3D): add_child(load("res://map/items/pot.tscn").instantiate()) base.add_child(steam) -func progress(p: float, warn: bool): - super(p, warn) +func progress(position_: float, speed: float, warn: bool): + super(position_, speed, warn) steam.emitting = true if warn: steam.color = Color(.2, .2, .2) diff --git a/client/map/items/pot_items.gd b/client/map/items/pot_items.gd index fae2ccaa..25fd74d3 100644 --- a/client/map/items/pot_items.gd +++ b/client/map/items/pot_items.gd @@ -51,8 +51,8 @@ class RawSteakP extends Pot: super(owned_by_) base.add_child(preload("res://map/items/raw_steak.tscn").instantiate()) - func progress(p: float, warn: bool): - super(p, warn) + func progress(position_: float, speed: float, warn: bool): + super(position_, speed, warn) if sound_id == null: sound_id = Sound.item_progress(self, preload("res://map/items/sounds/frying.ogg"), null) diff --git a/client/map/items/strawberry.gd b/client/map/items/strawberry.gd index ef9abb64..e663464f 100644 --- a/client/map/items/strawberry.gd +++ b/client/map/items/strawberry.gd @@ -24,8 +24,8 @@ func _init(owned_by_: Node3D): base.add_child(cut) cut.color = Color(1., 0., 0.) -func progress(p: float, warn: bool): - super(p, warn) +func progress(position_: float, speed: float, warn: bool): + super(position_, speed, warn) cut.emitting = true func finish(warn: bool): diff --git a/client/map/items/tomato.gd b/client/map/items/tomato.gd index 97cd668c..7ecff374 100644 --- a/client/map/items/tomato.gd +++ b/client/map/items/tomato.gd @@ -24,8 +24,8 @@ func _init(owned_by_: Node3D): base.add_child(cut) cut.color = Color(1., 0., 0.) -func progress(p: float, warn: bool): - super(p, warn) +func progress(position_: float, speed: float, warn: bool): + super(position_, speed, warn) cut.emitting = true func finish(warn: bool): |