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
+19
View File
@@ -0,0 +1,19 @@
extends GutTest
const GameScene = preload("res://scenes/Game.tscn")
func test_hud_shows_exact_chest_prompt_only_while_the_chest_is_a_context_target() -> void:
var game := GameScene.instantiate() as Game
add_child_autofree(game)
await get_tree().process_frame
var state := game.get_game_state()
var hud := game.get_node("HUD") as GameHud
state.map.set_cell(Vector2i(4, 11), GridMapState.CellKind.FLOOR)
state.player.cell = Vector2i(4, 8)
hud.refresh(state)
assert_eq(hud.get_context_prompt(), "Espace — Ouvrir le coffre")
state.player.cell = Vector2i(4, 10)
hud.refresh(state)
assert_eq(hud.get_context_prompt(), "")