From b99e4d18244baa8f972024f462fa3aaed70ecc7e Mon Sep 17 00:00:00 2001 From: tpart Date: Tue, 30 Jul 2024 13:58:48 +0200 Subject: Add street tile --- client/map/tile_factory.gd | 2 ++ client/map/tiles/path.tscn | 4 ++-- client/map/tiles/street.gd | 20 ++++++++++++++++++++ client/map/tiles/street.res | Bin 0 -> 1914 bytes client/map/tiles/street.tscn | 10 ++++++++++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 client/map/tiles/street.gd create mode 100644 client/map/tiles/street.res create mode 100644 client/map/tiles/street.tscn (limited to 'client') diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd index feadea9c..76c67103 100644 --- a/client/map/tile_factory.gd +++ b/client/map/tile_factory.gd @@ -80,6 +80,8 @@ static func produce(tile_name: String, node_name: String, neighbors: Array) -> T return Chandelier.new(node_name, neighbors) "ceiling-lamp": return CeilingLamp.new(node_name, neighbors) + "street": + return Street.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/path.tscn b/client/map/tiles/path.tscn index 1951680b..cb2d3c72 100644 --- a/client/map/tiles/path.tscn +++ b/client/map/tiles/path.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=2 format=3 uid="uid://beo16fa7lo12g"] +[gd_scene load_steps=2 format=3 uid="uid://bwyb2ujmcrsar"] -[ext_resource type="ArrayMesh" uid="uid://1jelocokc0vu" path="res://map/tiles/path.res" id="1_6fqu5"] +[ext_resource type="ArrayMesh" path="res://map/tiles/path.res" id="1_6fqu5"] [node name="Path" type="Node3D"] diff --git a/client/map/tiles/street.gd b/client/map/tiles/street.gd new file mode 100644 index 00000000..891b27a6 --- /dev/null +++ b/client/map/tiles/street.gd @@ -0,0 +1,20 @@ +# Hurry Curry! - 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 . +# +class_name Street +extends Tile + +func get_base_mesh(): + return preload("res://map/tiles/street.tscn").instantiate() diff --git a/client/map/tiles/street.res b/client/map/tiles/street.res new file mode 100644 index 00000000..13da376b Binary files /dev/null and b/client/map/tiles/street.res differ diff --git a/client/map/tiles/street.tscn b/client/map/tiles/street.tscn new file mode 100644 index 00000000..842b511d --- /dev/null +++ b/client/map/tiles/street.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://dhdu8gbrhj6wy"] + +[ext_resource type="ArrayMesh" path="res://map/tiles/street.res" id="1_h0wov"] + +[node name="Street" 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_h0wov") +skeleton = NodePath("") -- cgit v1.2.3-70-g09d2