aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2025-10-13 22:57:40 +0200
committertpart <tpart120@proton.me>2025-10-13 22:57:40 +0200
commitc50fa74e7dd71f554bdb57482352e7c75714ec12 (patch)
tree7032c45fb36dbfaadf157512990a41c2f6a73472 /client
parent509df43ca55f8d33cbc7e99d8fd1f4f9a5d542d8 (diff)
downloadhurrycurry-c50fa74e7dd71f554bdb57482352e7c75714ec12.tar
hurrycurry-c50fa74e7dd71f554bdb57482352e7c75714ec12.tar.bz2
hurrycurry-c50fa74e7dd71f554bdb57482352e7c75714ec12.tar.zst
Refactor food processor
Diffstat (limited to 'client')
-rw-r--r--client/map/items/food_processor.gd6
-rw-r--r--client/map/items/item.gd4
2 files changed, 4 insertions, 6 deletions
diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd
index 9f8230a4..6aabf11d 100644
--- a/client/map/items/food_processor.gd
+++ b/client/map/items/food_processor.gd
@@ -46,10 +46,10 @@ func add_contents(contents: Array[String]):
add_child(FoodProcessorFill.new(self, Color8(200, 180, 160)))
"coconut":
add_child(FoodProcessorFill.new(self, Color(.8, .5, .4)))
- base.add_child(load("res://map/items/coconut.tscn").instantiate())
+ super([i])
"strawberry":
processing.color = Color(.9, .0, .0)
- base.add_child(load("res://map/items/strawberry.tscn").instantiate())
+ super([i])
"strawberry-shake":
add_child(FoodProcessorFill.new(self, Color8(250, 140, 180)))
"strawberry-icecream":
@@ -60,7 +60,7 @@ func add_contents(contents: Array[String]):
add_child(FoodProcessorFill.new(self, Color(0.596, 0.341, 0.259)))
"tomato":
processing.color = Color(1.,0.,0.)
- base.add_child(load("res://map/items/tomato.tscn").instantiate())
+ super([i])
"tomato-juice":
add_child(FoodProcessorFill.new(self, Color(1., .0, .0)))
_: super([i])
diff --git a/client/map/items/item.gd b/client/map/items/item.gd
index d6e65618..3e5cf81f 100644
--- a/client/map/items/item.gd
+++ b/client/map/items/item.gd
@@ -62,9 +62,7 @@ func is_round(): return true
func add_contents(contents: Array[String]):
for i in contents:
- match i:
- _:
- base.add_child(ItemFactory.produce(i, self))
+ base.add_child(ItemFactory.produce(i, self))
func animate_spawn():
creation_timer = 0.0