aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/map/item_factory.gd10
-rw-r--r--client/map/items/Cuttable.gd (renamed from client/map/items/cheese.gd)11
-rw-r--r--client/map/items/Cuttable.gd.uid1
-rw-r--r--client/map/items/cheese.gd.uid1
-rw-r--r--client/map/items/potato.gd29
-rw-r--r--client/map/items/potato.gd.uid1
-rw-r--r--client/map/items/strawberry.gd33
-rw-r--r--client/map/items/strawberry.gd.uid1
-rw-r--r--client/map/items/tomato.gd29
-rw-r--r--client/map/items/tomato.gd.uid1
10 files changed, 11 insertions, 106 deletions
diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd
index 200de874..3c3cf63c 100644
--- a/client/map/item_factory.gd
+++ b/client/map/item_factory.gd
@@ -37,7 +37,7 @@ static func produce(raw_name: String, owned_by: Node3D) -> Item:
static func produce_inner(item: ItemName, owned_by: Node3D) -> Item:
match item.name:
"bun": return Bun.new(owned_by)
- "cheese": return Cheese.new(owned_by)
+ "cheese": return Cuttable.new(owned_by, preload("res://map/items/cheese.tscn"), Color("ffc844ff"))
"cooked-noodles": return GenericItem.new(owned_by, preload("res://map/items/cooked_noodles.tscn"))
"dirt": return GenericItem.new(owned_by, preload("res://map/items/dirt.tscn"))
"sliced-bun": return GenericItem.new(owned_by, preload("res://map/items/sliced_bun.tscn"))
@@ -54,20 +54,20 @@ static func produce_inner(item: ItemName, owned_by: Node3D) -> Item:
"rolled-dough": return GenericItem.new(owned_by, preload("res://map/items/rolled_dough.tscn"))
"strawberry-mochi": return Mochi.new(owned_by, Color(.98, .70, .75))
"nigiri": return GenericItem.new(owned_by, preload("res://map/items/nigiri.tscn"))
- "steak": return GenericItem.new(owned_by, preload("res://map/items/steak.tscn"))
+ "steak": return Cuttable.new(owned_by, preload("res://map/items/steak.tscn"), Color(0.74, 0.192, 0.22))
"seared-steak": return GenericItem.new(owned_by, preload("res://map/items/seared_steak.tscn"))
"patty": return GenericItem.new(owned_by, preload("res://map/items/patty.tscn"))
"seared-patty": return GenericItem.new(owned_by, preload("res://map/items/seared_patty.tscn"))
"rice": return GenericItem.new(owned_by, preload("res://map/items/rice.tscn"))
"sliced-fish": return GenericItem.new(owned_by, preload("res://map/items/sliced_fish.tscn"))
- "strawberry": return Strawberry.new(owned_by)
+ "strawberry": return GenericItem.new(owned_by, preload("res://map/items/strawberry.tscn"))
"lettuce": return GenericItem.new(owned_by, preload("res://map/items/lettuce.tscn"))
- "tomato": return Tomato.new(owned_by) # TODO: move into choppable class / move code into cutting_board
+ "tomato": return Cuttable.new(owned_by, preload("res://map/items/tomato.tscn"), Color(1., 0., 0.))
"sliced-leek": return GenericItem.new(owned_by, preload("res://map/items/sliced_leek/sliced_leek.tscn"), 0.05)
"sliced-lettuce": return GenericItem.new(owned_by, preload("res://map/items/sliced_lettuce.tscn"), 0.05)
"sliced-cheese": return GenericItem.new(owned_by, preload("res://map/items/sliced_cheese.tscn"), 0.05)
"sliced-tomato": return GenericItem.new(owned_by, preload("res://map/items/sliced_tomato.tscn"), 0.05)
- "potato": return Potato.new(owned_by)
+ "potato": return Cuttable.new(owned_by, preload("res://map/items/potato.tscn"), Color("e1af5e"))
"sliced-potato": return GenericItem.new(owned_by, preload("res://map/items/sliced_potato.tscn"))
"dirty-plate":
var plate = Plate.new(owned_by)
diff --git a/client/map/items/cheese.gd b/client/map/items/Cuttable.gd
index 0e6d9df7..e106a96d 100644
--- a/client/map/items/cheese.gd
+++ b/client/map/items/Cuttable.gd
@@ -13,16 +13,15 @@
# 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 Cheese
-extends Item
+class_name Cuttable
+extends GenericItem
var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate()
-func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/cheese.tscn").instantiate())
+func _init(owned_by_: Node3D, scene: PackedScene, color: Color, height_: float = height):
+ super(owned_by_, scene, height_)
base.add_child(cut)
- cut.color = Color("ffc844ff")
+ cut.color = color
func progress(position_: float, speed: float, warn: bool):
super(position_, speed, warn)
diff --git a/client/map/items/Cuttable.gd.uid b/client/map/items/Cuttable.gd.uid
new file mode 100644
index 00000000..0854ed74
--- /dev/null
+++ b/client/map/items/Cuttable.gd.uid
@@ -0,0 +1 @@
+uid://b8mq1c1sb2xnr
diff --git a/client/map/items/cheese.gd.uid b/client/map/items/cheese.gd.uid
deleted file mode 100644
index a3beb088..00000000
--- a/client/map/items/cheese.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://g04vr0yok8t1
diff --git a/client/map/items/potato.gd b/client/map/items/potato.gd
deleted file mode 100644
index afc0ca5c..00000000
--- a/client/map/items/potato.gd
+++ /dev/null
@@ -1,29 +0,0 @@
-# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
-#
-# 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 Potato
-extends Item
-
-var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate()
-
-func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/potato.tscn").instantiate())
- base.add_child(cut)
- cut.color = Color("e1af5e")
-
-func progress(position_: float, speed: float, warn: bool):
- super(position_, speed, warn)
- cut.emitting = speed > 0
diff --git a/client/map/items/potato.gd.uid b/client/map/items/potato.gd.uid
deleted file mode 100644
index 1166947d..00000000
--- a/client/map/items/potato.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://55drj8jpmcci
diff --git a/client/map/items/strawberry.gd b/client/map/items/strawberry.gd
deleted file mode 100644
index 3478dffd..00000000
--- a/client/map/items/strawberry.gd
+++ /dev/null
@@ -1,33 +0,0 @@
-# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
-#
-# 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 Strawberry
-extends Item
-
-var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate()
-
-func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/strawberry.tscn").instantiate())
- base.add_child(cut)
- cut.color = Color(1., 0., 0.)
-
-func progress(position_: float, speed: float, warn: bool):
- super(position_, speed, warn)
- cut.emitting = true
-
-func finish():
- super()
- cut.emitting = false
diff --git a/client/map/items/strawberry.gd.uid b/client/map/items/strawberry.gd.uid
deleted file mode 100644
index c927a54f..00000000
--- a/client/map/items/strawberry.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://dg0a4sawbd81j
diff --git a/client/map/items/tomato.gd b/client/map/items/tomato.gd
deleted file mode 100644
index 4782010f..00000000
--- a/client/map/items/tomato.gd
+++ /dev/null
@@ -1,29 +0,0 @@
-# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
-#
-# 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 Tomato
-extends Item
-
-var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate()
-
-func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/tomato.tscn").instantiate())
- base.add_child(cut)
- cut.color = Color(1., 0., 0.)
-
-func progress(position_: float, speed: float, warn: bool):
- super(position_, speed, warn)
- cut.emitting = speed > 0
diff --git a/client/map/items/tomato.gd.uid b/client/map/items/tomato.gd.uid
deleted file mode 100644
index 0bd23b47..00000000
--- a/client/map/items/tomato.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://e6l4io5vsomt