Running the game window on a clean profile exposed two player-visible defects
that headless assertions never caught.
A brand-new player was told "offline report settled · progress saved" before
they had ever left the game. ProfileStore now tracks seen_intro (schema 4,
migrated from older saves as already-seen), first runs show a welcome banner,
and starting the first node marks the intro seen and persists it.
Upgrade buttons at 0 gold were disabled but looked identical to enabled ones,
and their text showed the literal "需 %d ◆": the string used printf % while
UiText.tf only substitutes {name}. Fixed all such strings (offline reward,
victory, rebuild, archive, growth) to use named placeholders, and added a
validator guard that fails any key passed to UiText.tf whose text still has a
printf % placeholder. Disabled upgrades now read "需 120 ◆" and render dimmed.
Added a first-run evidence test over a real rendered GameRoot. It verifies the
welcome banner, unaffordable button state, and that intro-seen persists.
tools/run_p2_checks.sh now runs 17 gates; all pass. Verified again in a live
Godot window with a clean profile and terminated the process after inspection.
9 lines
371 B
Bash
9 lines
371 B
Bash
#!/bin/zsh
|
|
# Shared test environment: point ProfileStore at an isolated save directory so
|
|
# automated runs can never overwrite the player's real windroost_profile.json.
|
|
# Source this from test runners before launching Godot.
|
|
|
|
export WINDROOST_SAVE_DIR="/tmp/opencode/windroost-test-save"
|
|
export WINDROOST_SAVE_NAME="windroost_profile.json"
|
|
mkdir -p "$WINDROOST_SAVE_DIR"
|