aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/map/tile_factory.gd2
-rw-r--r--client/map/tiles/grass.gd (renamed from client/map/items/grass.gd)0
-rw-r--r--client/map/tiles/grass.tscn2
-rw-r--r--client/map/tiles/grass_side.tscn2
-rw-r--r--client/map/tiles/path.gd23
-rw-r--r--client/map/tiles/path.resbin0 -> 1907 bytes
-rw-r--r--client/map/tiles/path.tscn10
7 files changed, 37 insertions, 2 deletions
diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd
index 3ff59640..be2b3c49 100644
--- a/client/map/tile_factory.gd
+++ b/client/map/tile_factory.gd
@@ -58,6 +58,8 @@ static func produce(tile_name: String, node_name: String, neighbors: Array) -> T
return ExteriorTree.new(node_name, neighbors)
"grass":
return Grass.new(node_name, neighbors)
+ "path":
+ return Path.new(node_name, neighbors)
var t:
push_warning("tile %s unknown" % t)
return GenericTile.new(node_name, neighbors, t)
diff --git a/client/map/items/grass.gd b/client/map/tiles/grass.gd
index 15ee7603..15ee7603 100644
--- a/client/map/items/grass.gd
+++ b/client/map/tiles/grass.gd
diff --git a/client/map/tiles/grass.tscn b/client/map/tiles/grass.tscn
index 31ff6a69..649cc6c1 100644
--- a/client/map/tiles/grass.tscn
+++ b/client/map/tiles/grass.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://bi6o7lbvhunj1"]
-[ext_resource type="ArrayMesh" path="res://map/tiles/grass.res" id="1_pjjrj"]
+[ext_resource type="ArrayMesh" uid="uid://dyu8iuolwqr5l" path="res://map/tiles/grass.res" id="1_pjjrj"]
[node name="Grass" type="Node3D"]
diff --git a/client/map/tiles/grass_side.tscn b/client/map/tiles/grass_side.tscn
index c49ea4ca..08e04505 100644
--- a/client/map/tiles/grass_side.tscn
+++ b/client/map/tiles/grass_side.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dbp0ts6tfycev"]
-[ext_resource type="ArrayMesh" path="res://map/tiles/grass_side.tres" id="1_u044x"]
+[ext_resource type="ArrayMesh" uid="uid://l2by4gv4wpd1" path="res://map/tiles/grass_side.tres" id="1_u044x"]
[node name="GrassSide" type="Node3D"]
diff --git a/client/map/tiles/path.gd b/client/map/tiles/path.gd
new file mode 100644
index 00000000..76c49b64
--- /dev/null
+++ b/client/map/tiles/path.gd
@@ -0,0 +1,23 @@
+# 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 Path
+extends Tile
+
+func _init(rename: String, _neighbors: Array):
+ super(rename, _neighbors)
+ var path_tile = preload("res://map/tiles/path.tscn").instantiate()
+ path_tile.position += Vector3(0.5, 0, 0.5)
+ add_child(path_tile)
diff --git a/client/map/tiles/path.res b/client/map/tiles/path.res
new file mode 100644
index 00000000..e775b24e
--- /dev/null
+++ b/client/map/tiles/path.res
Binary files differ
diff --git a/client/map/tiles/path.tscn b/client/map/tiles/path.tscn
new file mode 100644
index 00000000..1951680b
--- /dev/null
+++ b/client/map/tiles/path.tscn
@@ -0,0 +1,10 @@
+[gd_scene load_steps=2 format=3 uid="uid://beo16fa7lo12g"]
+
+[ext_resource type="ArrayMesh" uid="uid://1jelocokc0vu" path="res://map/tiles/path.res" id="1_6fqu5"]
+
+[node name="Path" type="Node3D"]
+
+[node name="Mesh" type="MeshInstance3D" parent="."]
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.3, 0)
+mesh = ExtResource("1_6fqu5")
+skeleton = NodePath("")