aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-06-24 02:00:24 +0200
committernokoe <nokoe@mailbox.org>2024-06-24 02:01:09 +0200
commit372bc4897f81fabb919ab79bce6d6d7aa00fad78 (patch)
treeb094c5dbad652850e287413fd1101a4c180063a0
parent4c51bd75579b148ba94f5a87aa8bd8ff19569705 (diff)
downloadhurrycurry-372bc4897f81fabb919ab79bce6d6d7aa00fad78.tar
hurrycurry-372bc4897f81fabb919ab79bce6d6d7aa00fad78.tar.bz2
hurrycurry-372bc4897f81fabb919ab79bce6d6d7aa00fad78.tar.zst
add some items
-rw-r--r--client/map/item_factory.gd16
-rw-r--r--client/map/items/dirt.resbin0 -> 4343 bytes
-rw-r--r--client/map/items/dirt.tscn10
-rw-r--r--client/map/items/dirty_plate.gd21
-rw-r--r--client/map/items/generic_item.gd2
-rw-r--r--client/map/items/item.gd8
-rw-r--r--client/map/items/plate.gd5
-rw-r--r--client/map/items/plate.resbin6217 -> 6227 bytes
-rw-r--r--client/map/items/pot.gd24
-rw-r--r--client/map/items/pot.resbin0 -> 11500 bytes
-rw-r--r--client/map/items/pot.tscn10
-rw-r--r--client/map/items/raw_steak.gd21
-rw-r--r--client/map/items/raw_steak.resbin0 -> 14014 bytes
-rw-r--r--client/map/items/raw_steak.tscn10
-rw-r--r--client/map/items/raw_steak_pot.gd21
-rw-r--r--client/map/items/sliced_tomato.gd21
-rw-r--r--client/map/items/sliced_tomato.resbin0 -> 8155 bytes
-rw-r--r--client/map/items/sliced_tomato.tscn10
-rw-r--r--client/map/items/steak.resbin0 -> 14183 bytes
-rw-r--r--client/map/items/steak.tscn10
-rw-r--r--client/map/items/steak_plate.gd21
-rw-r--r--client/map/items/steak_pot.gd21
-rw-r--r--client/map/items/tomato.gd21
-rw-r--r--client/map/items/tomato.resbin0 -> 18793 bytes
-rw-r--r--client/map/items/tomato.tscn10
-rw-r--r--client/map/progress.gd3
-rw-r--r--client/map/tiles/stove.gd3
27 files changed, 265 insertions, 3 deletions
diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd
index 3dbb7018..fba1e006 100644
--- a/client/map/item_factory.gd
+++ b/client/map/item_factory.gd
@@ -20,5 +20,21 @@ static func produce(idx: int, owned_by: Node3D) -> Item:
match Multiplayer.item_names[idx]:
"plate":
return Plate.new(owned_by)
+ "dirty-plate":
+ return DirtyPlate.new(owned_by)
+ "tomato":
+ return Tomato.new(owned_by)
+ "raw-steak":
+ return RawSteak.new(owned_by)
+ "sliced-tomato":
+ return SlicedTomato.new(owned_by)
+ "pot":
+ return Pot.new(owned_by)
+ "raw-steak-pot":
+ return RawSteakPot.new(owned_by)
+ "steak-pot":
+ return SteakPot.new(owned_by)
+ "steak-plate":
+ return SteakPlate.new(owned_by)
var t:
return GenericItem.new(owned_by, t)
diff --git a/client/map/items/dirt.res b/client/map/items/dirt.res
new file mode 100644
index 00000000..3043f8d8
--- /dev/null
+++ b/client/map/items/dirt.res
Binary files differ
diff --git a/client/map/items/dirt.tscn b/client/map/items/dirt.tscn
new file mode 100644
index 00000000..18956b3d
--- /dev/null
+++ b/client/map/items/dirt.tscn
@@ -0,0 +1,10 @@
+[gd_scene load_steps=2 format=3 uid="uid://cluraed43qoeb"]
+
+[ext_resource type="ArrayMesh" uid="uid://dla7bxb6byk48" path="res://map/items/dirt.res" id="1_xmsre"]
+
+[node name="Dirt" type="Node3D"]
+
+[node name="Mesh" type="MeshInstance3D" parent="."]
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.015, 0)
+mesh = ExtResource("1_xmsre")
+skeleton = NodePath("")
diff --git a/client/map/items/dirty_plate.gd b/client/map/items/dirty_plate.gd
new file mode 100644
index 00000000..ace34452
--- /dev/null
+++ b/client/map/items/dirty_plate.gd
@@ -0,0 +1,21 @@
+# Undercooked - a game about cooking
+# 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 DirtyPlate
+extends Plate
+
+func _init(owned_by_: Node3D):
+ super(owned_by_)
+ base.add_child(load("res://map/items/dirt.tscn").instantiate())
diff --git a/client/map/items/generic_item.gd b/client/map/items/generic_item.gd
index 70e9b354..be9d5a0a 100644
--- a/client/map/items/generic_item.gd
+++ b/client/map/items/generic_item.gd
@@ -31,4 +31,4 @@ func _init(owned_by_: Node3D, t: String):
mat.billboard_mode = mat.BILLBOARD_ENABLED
mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
text.material = mat
- add_child(mesh)
+ base.add_child(mesh)
diff --git a/client/map/items/item.gd b/client/map/items/item.gd
index f817e72d..cb0cf0b7 100644
--- a/client/map/items/item.gd
+++ b/client/map/items/item.gd
@@ -17,13 +17,16 @@ class_name Item
extends Node3D
var owned_by: Node3D
+var base: Node3D = Node3D.new()
var progress_instance: ProgressBar3D = preload("res://map/progress.tscn").instantiate()
func _init(owned_by_: Node3D):
progress_instance.position.y = 2.
- add_child(progress_instance)
progress_instance.visible = false
+ add_child(progress_instance)
+ base.position = base_position()
+ add_child(base)
owned_by = owned_by_
func _ready():
@@ -38,3 +41,6 @@ func progress(p: float, warn: bool):
func finish(_warn: bool):
progress_instance.visible = false
+
+static func base_position() -> Vector3:
+ return Vector3(0., 0., 0.)
diff --git a/client/map/items/plate.gd b/client/map/items/plate.gd
index 8ebea099..91faf0b1 100644
--- a/client/map/items/plate.gd
+++ b/client/map/items/plate.gd
@@ -18,4 +18,7 @@ extends Item
func _init(owned_by_: Node3D):
super(owned_by_)
- add_child(load("res://map/items/plate.tscn").instantiate())
+ base.add_child(load("res://map/items/plate.tscn").instantiate())
+
+static func base_position() -> Vector3:
+ return Vector3(0., 0.015, 0.)
diff --git a/client/map/items/plate.res b/client/map/items/plate.res
index 25e6e832..b57844c3 100644
--- a/client/map/items/plate.res
+++ b/client/map/items/plate.res
Binary files differ
diff --git a/client/map/items/pot.gd b/client/map/items/pot.gd
new file mode 100644
index 00000000..fa5b038d
--- /dev/null
+++ b/client/map/items/pot.gd
@@ -0,0 +1,24 @@
+# Undercooked - a game about cooking
+# 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 Pot
+extends Item
+
+func _init(owned_by_: Node3D):
+ super(owned_by_)
+ base.add_child(load("res://map/items/pot.tscn").instantiate())
+
+static func base_position() -> Vector3:
+ return Vector3(0., 0.015, 0.)
diff --git a/client/map/items/pot.res b/client/map/items/pot.res
new file mode 100644
index 00000000..df67fed3
--- /dev/null
+++ b/client/map/items/pot.res
Binary files differ
diff --git a/client/map/items/pot.tscn b/client/map/items/pot.tscn
new file mode 100644
index 00000000..f823cae2
--- /dev/null
+++ b/client/map/items/pot.tscn
@@ -0,0 +1,10 @@
+[gd_scene load_steps=2 format=3 uid="uid://df0hhdcyubyid"]
+
+[ext_resource type="ArrayMesh" uid="uid://dm14h4sasn2bm" path="res://map/items/pot.res" id="1_41enh"]
+
+[node name="Pot" type="Node3D"]
+
+[node name="Mesh" type="MeshInstance3D" parent="."]
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
+mesh = ExtResource("1_41enh")
+skeleton = NodePath("")
diff --git a/client/map/items/raw_steak.gd b/client/map/items/raw_steak.gd
new file mode 100644
index 00000000..328e4e92
--- /dev/null
+++ b/client/map/items/raw_steak.gd
@@ -0,0 +1,21 @@
+# Undercooked - a game about cooking
+# 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 RawSteak
+extends Item
+
+func _init(owned_by_: Node3D):
+ super(owned_by_)
+ base.add_child(load("res://map/items/raw_steak.tscn").instantiate())
diff --git a/client/map/items/raw_steak.res b/client/map/items/raw_steak.res
new file mode 100644
index 00000000..f94e895c
--- /dev/null
+++ b/client/map/items/raw_steak.res
Binary files differ
diff --git a/client/map/items/raw_steak.tscn b/client/map/items/raw_steak.tscn
new file mode 100644
index 00000000..f8b282fb
--- /dev/null
+++ b/client/map/items/raw_steak.tscn
@@ -0,0 +1,10 @@
+[gd_scene load_steps=2 format=3 uid="uid://burjwm1m1ukbh"]
+
+[ext_resource type="ArrayMesh" uid="uid://tuorjx63f0ij" path="res://map/items/raw_steak.res" id="1_dw8a3"]
+
+[node name="RawSteak" type="Node3D"]
+
+[node name="Mesh" type="MeshInstance3D" parent="."]
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
+mesh = ExtResource("1_dw8a3")
+skeleton = NodePath("")
diff --git a/client/map/items/raw_steak_pot.gd b/client/map/items/raw_steak_pot.gd
new file mode 100644
index 00000000..992554ea
--- /dev/null
+++ b/client/map/items/raw_steak_pot.gd
@@ -0,0 +1,21 @@
+# Undercooked - a game about cooking
+# 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 RawSteakPot
+extends Pot
+
+func _init(owned_by_: Node3D):
+ super(owned_by_)
+ base.add_child(load("res://map/items/raw_steak.tscn").instantiate())
diff --git a/client/map/items/sliced_tomato.gd b/client/map/items/sliced_tomato.gd
new file mode 100644
index 00000000..af5e53e2
--- /dev/null
+++ b/client/map/items/sliced_tomato.gd
@@ -0,0 +1,21 @@
+# Undercooked - a game about cooking
+# 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 SlicedTomato
+extends Item
+
+func _init(owned_by_: Node3D):
+ super(owned_by_)
+ base.add_child(load("res://map/items/sliced_tomato.tscn").instantiate())
diff --git a/client/map/items/sliced_tomato.res b/client/map/items/sliced_tomato.res
new file mode 100644
index 00000000..3594e6f9
--- /dev/null
+++ b/client/map/items/sliced_tomato.res
Binary files differ
diff --git a/client/map/items/sliced_tomato.tscn b/client/map/items/sliced_tomato.tscn
new file mode 100644
index 00000000..28ba45f4
--- /dev/null
+++ b/client/map/items/sliced_tomato.tscn
@@ -0,0 +1,10 @@
+[gd_scene load_steps=2 format=3 uid="uid://8u4yp0323kiw"]
+
+[ext_resource type="ArrayMesh" uid="uid://cwjqxolxw0ttl" path="res://map/items/sliced_tomato.res" id="1_6yvlk"]
+
+[node name="SlicedTomato" type="Node3D"]
+
+[node name="Mesh" type="MeshInstance3D" parent="."]
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
+mesh = ExtResource("1_6yvlk")
+skeleton = NodePath("")
diff --git a/client/map/items/steak.res b/client/map/items/steak.res
new file mode 100644
index 00000000..68aaa171
--- /dev/null
+++ b/client/map/items/steak.res
Binary files differ
diff --git a/client/map/items/steak.tscn b/client/map/items/steak.tscn
new file mode 100644
index 00000000..5ec962f4
--- /dev/null
+++ b/client/map/items/steak.tscn
@@ -0,0 +1,10 @@
+[gd_scene load_steps=2 format=3 uid="uid://c70af18pms3gw"]
+
+[ext_resource type="ArrayMesh" uid="uid://kfod37qy5sx" path="res://map/items/steak.res" id="1_iei2f"]
+
+[node name="Steak" type="Node3D"]
+
+[node name="Mesh" type="MeshInstance3D" parent="."]
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
+mesh = ExtResource("1_iei2f")
+skeleton = NodePath("")
diff --git a/client/map/items/steak_plate.gd b/client/map/items/steak_plate.gd
new file mode 100644
index 00000000..454400ee
--- /dev/null
+++ b/client/map/items/steak_plate.gd
@@ -0,0 +1,21 @@
+# Undercooked - a game about cooking
+# 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 SteakPlate
+extends Plate
+
+func _init(owned_by_: Node3D):
+ super(owned_by_)
+ base.add_child(load("res://map/items/steak.tscn").instantiate())
diff --git a/client/map/items/steak_pot.gd b/client/map/items/steak_pot.gd
new file mode 100644
index 00000000..fd755e62
--- /dev/null
+++ b/client/map/items/steak_pot.gd
@@ -0,0 +1,21 @@
+# Undercooked - a game about cooking
+# 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 SteakPot
+extends Pot
+
+func _init(owned_by_: Node3D):
+ super(owned_by_)
+ base.add_child(load("res://map/items/steak.tscn").instantiate())
diff --git a/client/map/items/tomato.gd b/client/map/items/tomato.gd
new file mode 100644
index 00000000..989e4a54
--- /dev/null
+++ b/client/map/items/tomato.gd
@@ -0,0 +1,21 @@
+# Undercooked - a game about cooking
+# 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 Tomato
+extends Item
+
+func _init(owned_by_: Node3D):
+ super(owned_by_)
+ base.add_child(load("res://map/items/tomato.tscn").instantiate())
diff --git a/client/map/items/tomato.res b/client/map/items/tomato.res
new file mode 100644
index 00000000..aafc8738
--- /dev/null
+++ b/client/map/items/tomato.res
Binary files differ
diff --git a/client/map/items/tomato.tscn b/client/map/items/tomato.tscn
new file mode 100644
index 00000000..4589cca5
--- /dev/null
+++ b/client/map/items/tomato.tscn
@@ -0,0 +1,10 @@
+[gd_scene load_steps=2 format=3 uid="uid://cvgmmrm8xqg4t"]
+
+[ext_resource type="ArrayMesh" uid="uid://bh5t6gqdxv1t8" path="res://map/items/tomato.res" id="1_8xuup"]
+
+[node name="Tomato" type="Node3D"]
+
+[node name="Mesh" type="MeshInstance3D" parent="."]
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
+mesh = ExtResource("1_8xuup")
+skeleton = NodePath("")
diff --git a/client/map/progress.gd b/client/map/progress.gd
index 4d6494f6..61a0c7dd 100644
--- a/client/map/progress.gd
+++ b/client/map/progress.gd
@@ -16,6 +16,9 @@
class_name ProgressBar3D
extends MeshInstance3D
+func _ready():
+ self.get_active_material(0).duplicate(true)
+
func set_progress(progress: float, bad: bool):
var mat: ShaderMaterial = self.get_active_material(0)
mat.set_shader_parameter("progress", progress)
diff --git a/client/map/tiles/stove.gd b/client/map/tiles/stove.gd
index 216129fb..e17ced36 100644
--- a/client/map/tiles/stove.gd
+++ b/client/map/tiles/stove.gd
@@ -19,3 +19,6 @@ extends Counter
func _init(rename: String, neighbors: Array):
super(rename, neighbors)
base.add_child(load("res://map/tiles/stove.tscn").instantiate())
+
+static func interact_target() -> Vector3:
+ return Vector3(0., 0.625, 0.)