summaryrefslogtreecommitdiff
path: root/client/scripts/map/floor.gd
diff options
context:
space:
mode:
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]