Files
windroost/p2_godot_sample/artifacts/first_run_test.json
T
wushenghua 5fe1ff57b7 fix: correct first-run onboarding and printf placeholders in UI strings
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.
2026-11-17 10:55:27 +08:00

21 lines
377 B
JSON

{
"kind": "windroost_first_run_test",
"overall": "PASS",
"problems": [],
"schema": 1,
"steps": [
{
"step": "first_run_banner",
"text": "欢迎来到风栖旅团 · 先从训练场升级英雄,再出发远征"
},
{
"disabled_count": 3,
"step": "upgrade_affordability"
},
{
"in_memory": true,
"persisted": true,
"step": "intro_seen"
}
]
}