aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-08-16 22:00:37 +0200
committertpart <tpart120@proton.me>2024-08-16 22:00:49 +0200
commit1b7aad1747b69b369ee646399b49e44c5f250124 (patch)
treecebbae4ec45b1988d70fbdd4bd874effd804ac0e
parent1b2ebe279cbb537ea9d76c7e623e368cbe0f00ad (diff)
downloadhurrycurry-1b7aad1747b69b369ee646399b49e44c5f250124.tar
hurrycurry-1b7aad1747b69b369ee646399b49e44c5f250124.tar.bz2
hurrycurry-1b7aad1747b69b369ee646399b49e44c5f250124.tar.zst
Add strawberry crate model & implement item
-rw-r--r--client/map/tile_factory.gd2
-rw-r--r--client/map/tiles/strawberry_crate.gd21
-rw-r--r--client/map/tiles/strawberry_crate.tscn21
3 files changed, 44 insertions, 0 deletions
diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd
index a0dd2dca..06f1c1fa 100644
--- a/client/map/tile_factory.gd
+++ b/client/map/tile_factory.gd
@@ -86,6 +86,8 @@ static func produce(tile_name: String, node_name: String, neighbors: Array) -> T
return Street.new(node_name, neighbors)
"rice-crate":
return RiceCrate.new(node_name, neighbors)
+ "strawberry-crate":
+ return StrawberryCrate.new(node_name, neighbors)
var t:
push_warning("tile %s unknown" % t)
return GenericTile.new(node_name, neighbors, t)
diff --git a/client/map/tiles/strawberry_crate.gd b/client/map/tiles/strawberry_crate.gd
new file mode 100644
index 00000000..6a236af4
--- /dev/null
+++ b/client/map/tiles/strawberry_crate.gd
@@ -0,0 +1,21 @@
+# Hurry Curry! - a game about cooking
+# 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
+# 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 StrawberryCrate
+extends Crate
+
+func _init(rename: String, neighbors: Array):
+ super(rename, neighbors)
+ base.add_child(load("res://map/tiles/strawberry_crate.tscn").instantiate())
diff --git a/client/map/tiles/strawberry_crate.tscn b/client/map/tiles/strawberry_crate.tscn
new file mode 100644
index 00000000..070323b6
--- /dev/null
+++ b/client/map/tiles/strawberry_crate.tscn
@@ -0,0 +1,21 @@
+[gd_scene load_steps=3 format=3 uid="uid://disox718eydry"]
+
+[ext_resource type="PackedScene" uid="uid://xdui0oya4lpb" path="res://map/tiles/crate.tscn" id="1_j8iml"]
+[ext_resource type="PackedScene" uid="uid://df1xktleeqg3m" path="res://map/items/strawberry.tscn" id="3_pv4co"]
+
+[node name="StrawberryCrate" instance=ExtResource("1_j8iml")]
+
+[node name="Strawberry" parent="." index="1" instance=ExtResource("3_pv4co")]
+transform = Transform3D(0.450462, -0.749695, 0.48481, 0.857167, 0.515038, 0, -0.249695, 0.415563, 0.87462, 0.280431, 0.2, -0.249977)
+
+[node name="Strawberry2" parent="." index="2" instance=ExtResource("3_pv4co")]
+transform = Transform3D(0.514594, -0.856429, -0.0415094, 0.857167, 0.515038, 0, 0.0213789, -0.0355805, 0.999138, 0.304305, 0.2, 0.224393)
+
+[node name="Strawberry3" parent="." index="3" instance=ExtResource("3_pv4co")]
+transform = Transform3D(0.333174, -0.941988, -0.0406744, 0.942623, 0.333757, -0.00828417, 0.0213789, -0.0355805, 0.999138, 0.0704219, 0.2, 0.0109546)
+
+[node name="Strawberry4" parent="." index="4" instance=ExtResource("3_pv4co")]
+transform = Transform3D(-0.06674, -0.173859, -0.982506, 0.976472, -0.213751, -0.0285059, -0.205055, -0.961293, 0.184035, -0.181014, 0.232884, -0.103933)
+
+[node name="Strawberry5" parent="." index="5" instance=ExtResource("3_pv4co")]
+transform = Transform3D(-0.0250969, -0.243938, 0.969466, 0.976472, -0.213751, -0.0285059, 0.214178, 0.945941, 0.243563, -0.181014, 0.232884, 0.0976371)