summaryrefslogtreecommitdiff
path: root/client/scripts/map/floor.gd
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-06-20 14:13:28 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-23 19:24:14 +0200
commit80039e0e7eb142d51f882a39981fd415ea3f5c54 (patch)
tree62d75807ff55374bdb5431dd5db82399d241c4c7 /client/scripts/map/floor.gd
parent5bf50cd276a568f55fb1d5aedef96e614bed015b (diff)
downloadhurrycurry-80039e0e7eb142d51f882a39981fd415ea3f5c54.tar
hurrycurry-80039e0e7eb142d51f882a39981fd415ea3f5c54.tar.bz2
hurrycurry-80039e0e7eb142d51f882a39981fd415ea3f5c54.tar.zst
map generation
Diffstat (limited to 'client/scripts/map/floor.gd')
-rw-r--r--client/scripts/map/floor.gd24
1 files changed, 24 insertions, 0 deletions
diff --git a/client/scripts/map/floor.gd b/client/scripts/map/floor.gd
new file mode 100644
index 00000000..d4e61c2d
--- /dev/null
+++ b/client/scripts/map/floor.gd
@@ -0,0 +1,24 @@
+class_name Floor
+extends Node3D
+
+var base = Node3D.new()
+
+enum Facing {
+ NEG_Y = 0,
+ NEG_X = 1,
+ Y = 2,
+ X = 3,
+}
+
+func setup(rename: String, _neighbors: Array):
+ add_child(load("res://models/prefabs/map/floor_kitchen_small.tscn").instantiate())
+ add_child(base)
+ self.name = rename
+
+func turn_facing(facing: Facing):
+ base.rotate_y(facing * 0.5 * PI + PI)
+
+func tile_name(idx):
+ if idx == null:
+ return null
+ return Multiplayer.tile_names[idx]