aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-09-13 21:57:42 +0200
committertpart <tpart120@proton.me>2024-09-13 21:57:42 +0200
commitaf815558d1e984dbec8dff12faa815cd924bdb0d (patch)
tree55a6d2262d718c8da31f5c02e72283557e1f1f9d
parentee1f0e2caa14c2e90f01b2d564208c5cd6b93457 (diff)
downloadhurrycurry-af815558d1e984dbec8dff12faa815cd924bdb0d.tar
hurrycurry-af815558d1e984dbec8dff12faa815cd924bdb0d.tar.bz2
hurrycurry-af815558d1e984dbec8dff12faa815cd924bdb0d.tar.zst
Add lettuce crate model; Implement tile
-rw-r--r--client/map/items/lettuce_crate.gd21
-rw-r--r--client/map/tile_factory.gd1
-rw-r--r--client/map/tiles/lettuce_crate.tscn18
3 files changed, 40 insertions, 0 deletions
diff --git a/client/map/items/lettuce_crate.gd b/client/map/items/lettuce_crate.gd
new file mode 100644
index 00000000..a3aead17
--- /dev/null
+++ b/client/map/items/lettuce_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 LettuceCrate
+extends Crate
+
+func _init(rename: String, neighbors: Array):
+ super(rename, neighbors)
+ base.add_child(load("res://map/tiles/lettuce_crate.tscn").instantiate())
diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd
index 0e444a0b..215aaa51 100644
--- a/client/map/tile_factory.gd
+++ b/client/map/tile_factory.gd
@@ -52,6 +52,7 @@ static func produce(tile_name: String, node_name: String, neighbors: Array) -> T
"fish-crate": return FishCrate.new(node_name, neighbors)
"flour-crate": return FlourCrate.new(node_name, neighbors)
"leek-crate": return LeekCrate.new(node_name, neighbors)
+ "lettuce-crate": return LettuceCrate.new(node_name, neighbors)
"steak-crate": return RawSteakCrate.new(node_name, neighbors)
"rice-crate": return RiceCrate.new(node_name, neighbors)
"strawberry-crate": return StrawberryCrate.new(node_name, neighbors)
diff --git a/client/map/tiles/lettuce_crate.tscn b/client/map/tiles/lettuce_crate.tscn
new file mode 100644
index 00000000..922773bf
--- /dev/null
+++ b/client/map/tiles/lettuce_crate.tscn
@@ -0,0 +1,18 @@
+[gd_scene load_steps=3 format=3 uid="uid://brgkq8x5jgxyb"]
+
+[ext_resource type="PackedScene" uid="uid://xdui0oya4lpb" path="res://map/tiles/crate.tscn" id="1_57wln"]
+[ext_resource type="PackedScene" uid="uid://cuf8vwqk6xujk" path="res://map/items/lettuce.tscn" id="3_03evc"]
+
+[node name="LettuceCrate" instance=ExtResource("1_57wln")]
+
+[node name="Lettuce" parent="." index="1" instance=ExtResource("3_03evc")]
+transform = Transform3D(0.258819, 0, -0.965926, 0, 1, 0, 0.965926, 0, 0.258819, -0.15, 0, -0.15)
+
+[node name="Lettuce2" parent="." index="2" instance=ExtResource("3_03evc")]
+transform = Transform3D(0.939693, 0, -0.34202, 0, 1, 0, 0.34202, 0, 0.939693, 0.15, 0, 0.15)
+
+[node name="Lettuce3" parent="." index="3" instance=ExtResource("3_03evc")]
+transform = Transform3D(0.939693, 0, -0.34202, 0, 1, 0, 0.34202, 0, 0.939693, -0.15, 0.15, 0.15)
+
+[node name="Lettuce4" parent="." index="4" instance=ExtResource("3_03evc")]
+transform = Transform3D(0.939693, 0, -0.34202, 0, 1, 0, 0.34202, 0, 0.939693, 0.15, 0.15, -0.15)