feat: add 30x20 demo map and chest interaction

This commit is contained in:
goose
2026-10-01 22:28:23 -04:00
parent b5eaf0ef4f
commit 67efd9dc67
27 changed files with 307 additions and 90 deletions
+5 -4
View File
@@ -22,13 +22,14 @@ func test_real_game_exposes_door_and_stairs_prompts_with_help_and_event_log() ->
var interact_event := InputEventKey.new()
interact_event.keycode = KEY_SPACE
interact_event.physical_keycode = KEY_SPACE
interact_event.pressed = true
game._unhandled_input(interact_event)
assert_eq(hud.get_context_prompt(), "Espace — Ouvrir la porte")
assert_eq(state.map.get_cell(Vector2i(2, 1)), GridMapState.CellKind.CLOSED_DOOR)
assert_eq(hud.get_context_prompt(), "")
assert_eq(state.map.get_cell(Vector2i(4, 11)), GridMapState.CellKind.FLOOR)
state.map.set_cell(Vector2i(2, 1), GridMapState.CellKind.FLOOR)
state.player.cell = Vector2i(9, 7)
state.map.set_cell(Vector2i(4, 11), GridMapState.CellKind.FLOOR)
state.player.cell = Vector2i(18, 4)
hud.refresh(state)
assert_eq(hud.get_context_prompt(), "Espace — Descendre l’escalier")
assert_eq(prompt_label.text, "Espace — Descendre l’escalier")