summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-07-27 13:42:44 +0200
committertpart <tpart120@proton.me>2024-07-27 13:42:51 +0200
commitec08301db79138a866037f4033a87b4c2926da80 (patch)
treed3f137c1a5d52b0ce29374c765987a383212fc0a
parentc3b960a9b821497012098ccdab82e8ad5f7dcd4a (diff)
downloadhurrycurry-ec08301db79138a866037f4033a87b4c2926da80.tar
hurrycurry-ec08301db79138a866037f4033a87b4c2926da80.tar.bz2
hurrycurry-ec08301db79138a866037f4033a87b4c2926da80.tar.zst
Add lamp tile and model
-rw-r--r--client/map/tile_factory.gd2
-rw-r--r--client/map/tiles/lamp.gd21
-rw-r--r--client/map/tiles/lamp.resbin0 -> 72760 bytes
-rw-r--r--client/map/tiles/lamp.tscn18
4 files changed, 41 insertions, 0 deletions
diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd
index 36204b3e..fdc40185 100644
--- a/client/map/tile_factory.gd
+++ b/client/map/tile_factory.gd
@@ -74,6 +74,8 @@ static func produce(tile_name: String, node_name: String, neighbors: Array) -> T
return PlayerPortal.new(node_name, neighbors, false)
"white-hole":
return PlayerPortal.new(node_name, neighbors, true)
+ "lamp":
+ return Lamp.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/lamp.gd b/client/map/tiles/lamp.gd
new file mode 100644
index 00000000..afe65020
--- /dev/null
+++ b/client/map/tiles/lamp.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 Lamp
+extends Grass
+
+func _init(rename: String, neighbors: Array):
+ add_child(preload("res://map/tiles/lamp.tscn").instantiate())
+ super(rename, neighbors)
diff --git a/client/map/tiles/lamp.res b/client/map/tiles/lamp.res
new file mode 100644
index 00000000..1757aae2
--- /dev/null
+++ b/client/map/tiles/lamp.res
Binary files differ
diff --git a/client/map/tiles/lamp.tscn b/client/map/tiles/lamp.tscn
new file mode 100644
index 00000000..680dcf02
--- /dev/null
+++ b/client/map/tiles/lamp.tscn
@@ -0,0 +1,18 @@
+[gd_scene load_steps=3 format=3 uid="uid://b6x5xlchih2mc"]
+
+[ext_resource type="ArrayMesh" uid="uid://cranpcmdoa8mx" path="res://map/tiles/lamp.res" id="1_2f0v1"]
+[ext_resource type="Script" path="res://map/tiles/lamp.gd" id="1_snoxq"]
+
+[node name="Lamp" type="Node3D"]
+script = ExtResource("1_snoxq")
+
+[node name="Mesh" type="MeshInstance3D" parent="."]
+transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0)
+mesh = ExtResource("1_2f0v1")
+
+[node name="OmniLight3D" type="OmniLight3D" parent="."]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.68634, 0)
+light_color = Color(0.896459, 0.717604, 0.587842, 1)
+light_energy = 2.0
+light_size = 0.503
+omni_range = 8.0