Good place
This commit is contained in:
@@ -74,9 +74,6 @@ func _apply_deploy(unit: Unit, coords: Vector2i) -> void:
|
||||
add_child(unit)
|
||||
|
||||
|
||||
func is_wall(coords: Vector2i) -> bool:
|
||||
return tile_map.get_cell_atlas_coords(coords) == tile_set.wall_tile_coords
|
||||
|
||||
func remove_unit(unit: Unit) -> void:
|
||||
if unit.get_parent() == self:
|
||||
remove_child(unit)
|
||||
@@ -95,17 +92,13 @@ func apply_layout(layout: MapLayout) -> void:
|
||||
|
||||
|
||||
func is_tile_passable(from: Vector2i, to: Vector2i) -> bool:
|
||||
if map_layout:
|
||||
return map_layout.is_passable(from, to)
|
||||
# Fallback: no room system, use legacy wall check
|
||||
return not is_wall(to)
|
||||
assert(map_layout != null, "CombatMap.is_tile_passable called before map_layout was set")
|
||||
return map_layout.is_passable(from, to)
|
||||
|
||||
|
||||
func is_tile_valid(coords: Vector2i) -> bool:
|
||||
if map_layout:
|
||||
return map_layout.is_tile_valid(coords)
|
||||
# Fallback: no room system, any non-wall tile is valid
|
||||
return not is_wall(coords)
|
||||
assert(map_layout != null, "CombatMap.is_tile_valid called before map_layout was set")
|
||||
return map_layout.is_tile_valid(coords)
|
||||
|
||||
|
||||
func draw_room_walls() -> void:
|
||||
|
||||
Reference in New Issue
Block a user