diff options
author | nokoe <nokoe@mailbox.org> | 2025-10-06 20:12:13 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2025-10-06 20:13:30 +0200 |
commit | fc4de182fa5c9afca17069f09f362109c0a957a2 (patch) | |
tree | 9e8c35475dfc1c9e26e9ac8d235983d4026a4888 /client/map/items/food_processor.gd | |
parent | a251cf726551935b59072ffc01b87876968715c2 (diff) | |
download | hurrycurry-fc4de182fa5c9afca17069f09f362109c0a957a2.tar hurrycurry-fc4de182fa5c9afca17069f09f362109c0a957a2.tar.bz2 hurrycurry-fc4de182fa5c9afca17069f09f362109c0a957a2.tar.zst |
allow every item to have contents
Diffstat (limited to 'client/map/items/food_processor.gd')
-rw-r--r-- | client/map/items/food_processor.gd | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd index 4932b791..f3ae0b9e 100644 --- a/client/map/items/food_processor.gd +++ b/client/map/items/food_processor.gd @@ -19,11 +19,12 @@ extends Item var time := 0. var processing: CPUParticles3D = load("res://map/items/processing.tscn").instantiate() -func _init(owned_by_: Node3D, contents: Array): +func _init(owned_by_: Node3D): super(owned_by_) add_child(load("res://map/items/food_processor.tscn").instantiate()) add_child(processing) - + +func add_contents(contents: Array[String]): for i in contents: match i: "milk": @@ -55,7 +56,7 @@ func _init(owned_by_: Node3D, contents: Array): base.add_child(load("res://map/items/tomato.tscn").instantiate()) "tomato-juice": add_child(FoodProcessorFill.new(self, Color(1., .0, .0))) - _: push_error("Food processor fill not implemented: %s" % contents) + _: super([i]) func _process(delta: float): super(delta) |