Openings between rooms

This commit is contained in:
gamer147
2026-04-08 08:06:15 -04:00
parent 92a0bb1d58
commit 767df71975
2 changed files with 90 additions and 21 deletions

View File

@@ -48,6 +48,14 @@ func is_passable(from: Vector2i, to: Vector2i) -> bool:
return _opening_set.has(_edge_key(from, to))
func get_openings() -> Array:
## Returns an array of [Vector2i, Vector2i] pairs representing opening edges.
var result: Array = []
for i in range(0, openings.size(), 2):
result.append([openings[i], openings[i + 1]])
return result
func get_walls() -> Array:
## Returns an array of [Vector2i, Vector2i] pairs representing wall edges.
## A wall exists where a room tile borders void or a different room (without an opening).