Fixes room spawning and adds physical doors and indicator lights

This commit is contained in:
2026-03-10 11:16:48 -04:00
parent 7559114623
commit b709b64a52
6 changed files with 172 additions and 5 deletions
+8
View File
@@ -90,3 +90,11 @@ func _entry_offset(from_direction: String) -> Vector2:
# ---------------------------------------------------------------------------
func _grid_to_world(grid_pos: Vector2i) -> Vector2:
return Vector2(grid_pos.x * ROOM_W, grid_pos.y * ROOM_H)
# Returns the RoomData.RoomType for the room at the given grid position.
# Returns -1 if no room exists at that position.
func get_room_type_at(grid_pos: Vector2i) -> int:
if _rooms.has(grid_pos):
return _rooms[grid_pos].data.type
return -1