feat: complete playtest parity improvements

This commit is contained in:
goose
2026-10-08 19:06:19 -04:00
parent cce25a1908
commit eca098b4b9
139 changed files with 3001 additions and 982 deletions
+3 -6
View File
@@ -12,23 +12,20 @@ func before_each() -> void:
func test_real_chest_open_displays_french_reward_then_take_all_updates_inventory_and_closes_panel() -> void:
var state := game.get_game_state()
state.enemies.clear()
var chest_cell := Vector2i(4, 7)
var chest_cell := state.player.cell + Vector2i.UP
state.floor_state.chests[chest_cell] = {
"loot_table_id": &"floor1_reward",
"opened": false,
"reward_seed": "e2e-reward",
}
state.map.set_cell(chest_cell, GridMapState.CellKind.CHEST)
var journal := game.get_node("HUD/EventLog") as RichTextLabel
for keycode in [KEY_E, KEY_UP, KEY_UP, KEY_UP, KEY_UP]:
await _dispatch_key(keycode)
assert_eq(state.player.cell, Vector2i(4, 8))
await _dispatch_key(KEY_E)
var chest_event := game.get_run_state().recent_events(1)[0]
var panel := game.get_node("HUD/LootPanel") as Control
var entries := game.get_node("HUD/LootPanel/Entries") as RichTextLabel
var entries := game.get_node("HUD/LootPanel/Layout/Entries") as RichTextLabel
assert_eq(chest_event.kind, &"chest_opened")
assert_true(chest_event.payload.has("items"))
assert_true(chest_event.payload.has("gold"))