aboutsummaryrefslogtreecommitdiff
path: root/client/map
diff options
context:
space:
mode:
Diffstat (limited to 'client/map')
-rw-r--r--client/map/items/food_processor.gd37
-rw-r--r--client/map/items/food_processor_fill.gd (renamed from client/map/items/food_processor_content.gd)15
-rw-r--r--client/map/items/food_processor_fill.res (renamed from client/map/items/food_processor_content.res)bin3141 -> 3141 bytes
-rw-r--r--client/map/items/food_processor_fill.tscn (renamed from client/map/items/food_processor_content.tscn)6
-rw-r--r--client/map/items/food_processor_items.gd92
5 files changed, 44 insertions, 106 deletions
diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd
index a53d2034..c082a741 100644
--- a/client/map/items/food_processor.gd
+++ b/client/map/items/food_processor.gd
@@ -1,5 +1,6 @@
# Hurry Curry! - a game about cooking
# Copyright 2024 nokoe
+# Copyright 2024 tpart
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -23,9 +24,39 @@ func _init(owned_by_: Node3D, contents: Array):
super(owned_by_)
add_child(load("res://map/items/food_processor.tscn").instantiate())
add_child(processing)
- # TODO
- # for c in contents:
- # base.add_child(ItemFactory.produce(c))
+
+ for i in contents:
+ match i:
+ "milk":
+ add_child(FoodProcessorFill.new(self, Color(1., 1., 1.)))
+ "rice-flour":
+ add_child(FoodProcessorFill.new(self, Color(1.,1.,.8)))
+ "rice":
+ processing.color = Color(1.,1.,.8)
+ base.add_child(load("res://map/items/rice.tscn").instantiate())
+ "flour":
+ processing.color = Color(.9, .9, .9)
+ base.add_child(load("res://map/items/flour.tscn").instantiate())
+ "dough":
+ 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())
+ "strawberry":
+ processing.color = Color(.9, .0, .0)
+ base.add_child(load("res://map/items/strawberry.tscn").instantiate())
+ "strawberry-shake":
+ add_child(FoodProcessorFill.new(self, Color8(250, 140, 180)))
+ "strawberry-icecream":
+ add_child(FoodProcessorFill.new(self, Color8(250, 180, 210)))
+ "strawberry-puree":
+ add_child(FoodProcessorFill.new(self, Color8(200, 80, 80)))
+ "tomato":
+ processing.color = Color(1.,0.,0.)
+ 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)
func _process(delta: float):
super(delta)
diff --git a/client/map/items/food_processor_content.gd b/client/map/items/food_processor_fill.gd
index 8968b390..aa92de69 100644
--- a/client/map/items/food_processor_content.gd
+++ b/client/map/items/food_processor_fill.gd
@@ -1,6 +1,7 @@
# Hurry Curry! - a game about cooking
# Copyright 2024 Rusty Striker
# Copyright 2024 nokoe
+# Copyright 2024 tpart
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -14,15 +15,13 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
-class_name FoodProcessorContent
-extends FoodProcessor
+class_name FoodProcessorFill
+extends Item
-var content: MeshInstance3D = load("res://map/items/food_processor_content.tscn").instantiate()
+var fill: MeshInstance3D = load("res://map/items/food_processor_fill.tscn").instantiate()
-func _init(owned_by_: Node3D):
+func _init(owned_by_: Node3D, c: Color):
super(owned_by_)
- add_child(content)
-
-func set_color(c: Color):
- var mat: BaseMaterial3D = content.get_active_material(0)
+ var mat: BaseMaterial3D = fill.get_active_material(0)
mat.albedo_color = c
+ add_child(fill)
diff --git a/client/map/items/food_processor_content.res b/client/map/items/food_processor_fill.res
index 7511cc75..7511cc75 100644
--- a/client/map/items/food_processor_content.res
+++ b/client/map/items/food_processor_fill.res
Binary files differ
diff --git a/client/map/items/food_processor_content.tscn b/client/map/items/food_processor_fill.tscn
index a1cac96e..fa85e40a 100644
--- a/client/map/items/food_processor_content.tscn
+++ b/client/map/items/food_processor_fill.tscn
@@ -1,13 +1,13 @@
[gd_scene load_steps=3 format=3 uid="uid://di5nq2vgvostp"]
-[ext_resource type="ArrayMesh" uid="uid://vkd0ty7khthl" path="res://map/items/food_processor_content.res" id="1_pyn0j"]
+[ext_resource type="ArrayMesh" uid="uid://vkd0ty7khthl" path="res://map/items/food_processor_fill.res" id="1_tcr3k"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0xb6r"]
resource_local_to_scene = true
cull_mode = 1
-[node name="FoodProcessorContent" type="MeshInstance3D"]
+[node name="FoodProcessorFill" type="MeshInstance3D"]
transform = Transform3D(0.15, 0, 0, 0, 0.15, 0, 0, 0, 0.15, 0, 0.3, 0)
-mesh = ExtResource("1_pyn0j")
+mesh = ExtResource("1_tcr3k")
skeleton = NodePath("")
surface_material_override/0 = SubResource("StandardMaterial3D_0xb6r")
diff --git a/client/map/items/food_processor_items.gd b/client/map/items/food_processor_items.gd
deleted file mode 100644
index 0b5be011..00000000
--- a/client/map/items/food_processor_items.gd
+++ /dev/null
@@ -1,92 +0,0 @@
-# Hurry Curry! - a game about cooking
-# Copyright 2024 metamuffin
-# Copyright 2024 nokoe
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, version 3 of the License only.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-class_name FoodProcessorItems
-
-class MilkF extends FoodProcessorContent:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- set_color(Color8(250, 250, 250))
-
-class RiceFlourF extends FoodProcessorContent:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- set_color(Color(1.,1.,.8))
-
-class RiceF extends FoodProcessor:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- processing.color = Color(1.,1.,.8)
- base.add_child(load("res://map/items/rice.tscn").instantiate())
-
-class FlourF extends FoodProcessor:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- processing.color = Color(.9, .9, .9)
- base.add_child(load("res://map/items/flour.tscn").instantiate())
-
-class DoughF extends FoodProcessorContent:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- set_color(Color8(200, 180, 160))
-
-class CoconutF extends FoodProcessor:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- processing.color = Color(.8, .5, .4)
- base.add_child(load("res://map/items/coconut.tscn").instantiate())
-
-class StrawberryF extends FoodProcessor:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- processing.color = Color(.9, .0, .0)
- base.add_child(load("res://map/items/strawberry.tscn").instantiate())
-
-class CoconutStrawberryPureeF extends StrawberryPureeF:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/coconut.tscn").instantiate())
-
-class MilkStrawberryF extends MilkF:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/strawberry.tscn").instantiate())
-
-class StrawberryShakeF extends FoodProcessorContent:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- set_color(Color8(250, 140, 180))
-
-class StrawberryIcecreamF extends FoodProcessorContent:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- set_color(Color8(250, 180, 210))
-
-class StrawberryPureeF extends FoodProcessorContent:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- set_color(Color8(200, 80, 80))
-
-class TomatoF extends FoodProcessor:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- processing.color = Color(1.,0.,0.)
- base.add_child(load("res://map/items/tomato.tscn").instantiate())
-
-class TomatoJuiceF extends FoodProcessorContent:
- func _init(owned_by_: Node3D):
- super(owned_by_)
- set_color(Color(1.,0.,0.))