fix: keep stairs interaction read-only

This commit is contained in:
goose
2026-10-01 16:00:47 -04:00
parent b469c6decb
commit a8e59544ff
7 changed files with 13 additions and 79 deletions
-11
View File
@@ -62,14 +62,3 @@ func test_opening_a_door_recalculates_fov_and_triggers_exactly_one_enemy_respons
assert_eq(state.map.get_cell(door), GridMapState.CellKind.FLOOR)
assert_true(state.visible_cells.has(revealed_cell))
assert_eq(enemy_result_count, 1)
func test_stairs_below_the_player_take_priority_and_mark_the_exit_reached() -> void:
var state := make_state()
state.map.set_cell(state.player.cell, GridMapState.CellKind.STAIRS)
state.map.set_cell(state.player.cell + Vector2i.UP, GridMapState.CellKind.CLOSED_DOOR)
var results: Array[TurnResult] = state.try_interact()
assert_true(state.exit_reached)
assert_eq(results[0].kind, &"stairs_used")
assert_eq(state.map.get_cell(state.player.cell + Vector2i.UP), GridMapState.CellKind.CLOSED_DOOR)