aboutsummaryrefslogtreecommitdiff
path: root/client/map/items
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2025-10-09 20:28:40 +0200
committertpart <tpart120@proton.me>2025-10-09 20:28:52 +0200
commita0cca54f8e82e04a838ed13507a74d3abd5d7b21 (patch)
tree7a3b0b40b853a4c3fdc46278c66333328736265f /client/map/items
parent3bf947c7f67c9f69544f5ca1a2b329d68e68769d (diff)
downloadhurrycurry-a0cca54f8e82e04a838ed13507a74d3abd5d7b21.tar
hurrycurry-a0cca54f8e82e04a838ed13507a74d3abd5d7b21.tar.bz2
hurrycurry-a0cca54f8e82e04a838ed13507a74d3abd5d7b21.tar.zst
Add raw pizza (#393)
Diffstat (limited to 'client/map/items')
-rw-r--r--client/map/items/raw_pizza.resbin0 -> 14252 bytes
-rw-r--r--client/map/items/raw_pizza.tscn10
-rw-r--r--client/map/items/rolled_dough.gd14
3 files changed, 21 insertions, 3 deletions
diff --git a/client/map/items/raw_pizza.res b/client/map/items/raw_pizza.res
new file mode 100644
index 00000000..b61427c9
--- /dev/null
+++ b/client/map/items/raw_pizza.res
Binary files differ
diff --git a/client/map/items/raw_pizza.tscn b/client/map/items/raw_pizza.tscn
new file mode 100644
index 00000000..0cd00992
--- /dev/null
+++ b/client/map/items/raw_pizza.tscn
@@ -0,0 +1,10 @@
+[gd_scene load_steps=2 format=3 uid="uid://d18w3kwuaehvv"]
+
+[ext_resource type="ArrayMesh" uid="uid://cwstqugiw76tc" path="res://map/items/raw_pizza.res" id="1_lcgk8"]
+
+[node name="Pizza" type="Node3D"]
+
+[node name="Mesh" type="MeshInstance3D" parent="."]
+transform = Transform3D(0.3, 0, 0, 0, 0.05, 0, 0, 0, 0.3, 0, 0.05, 0)
+mesh = ExtResource("1_lcgk8")
+skeleton = NodePath("")
diff --git a/client/map/items/rolled_dough.gd b/client/map/items/rolled_dough.gd
index cd59d907..55f97ccb 100644
--- a/client/map/items/rolled_dough.gd
+++ b/client/map/items/rolled_dough.gd
@@ -16,10 +16,18 @@
class_name RolledDough
extends Item
-
func _init(owned_by_: Node3D):
super(owned_by_)
- add_child(load("res://map/items/rolled_dough.tscn").instantiate())
func add_contents(contents: Array[String]):
- super(contents)
+ contents.sort()
+
+ if contents.is_empty():
+ base.add_child(load("res://map/items/rolled_dough.tscn").instantiate())
+ return
+ if contents == ["tomato-juice"]:
+ base.add_child(load("res://map/items/raw_pizza.tscn").instantiate())
+ return
+
+ base.add_child(load("res://map/items/rolled_dough.tscn").instantiate())
+ base.add_child(UnknownItem.new(owned_by, ",".join(contents)))