fix(v0.9): polish pass before release

Clears free mode when starting campaign/daily rooms, rebuilds levels on restore, fixes free win label, makes event claims cycle-aware and event schedule local-day based, grants VIBRATE permission, validates corrupt save values, and fixes Home scrolling, Guest Book close button, event claim contrast, achievement contrast, and difficulty modal spacing. Adds QA for these paths.
This commit is contained in:
Ratdoku Builder committed 2026-12-05 22:05:32 -06:00
1 parent 25c918e6a2
commit 3cdc3567f3
9 files changed
+115 -21

No files matched your search

+21
View File
@@ -541,10 +541,17 @@ func _test_v09(main, save) -> void:
_check(save.claim_event(id), "event gift should claim")
_check(save.claimed_event_frames().has(str(event.get("reward_frame", ""))), "event frame should unlock")
var cycle := int(event.get("cycle", 0))
save.data["events"] = {}
save.data["events"][id] = {"cycle": cycle - 1, "claimed": true, "progress": 3, "last_date": "old"}
save.save_game()
_check(not save.event_claimed(id), "event claim should reset on a new cycle")
save.data["completed_rooms"] = []
save.data["unlocked_guests"] = []
save.data["guest_notes"] = {}
save.save_game()
var campaign_board = save.load_board("campaign").duplicate(true)
main.show_screen("game", false)
await process_frame
main.game.start_free(1234)
@@ -552,10 +559,24 @@ func _test_v09(main, save) -> void:
_check(main.game.free_mode, "free play should start")
_check(main.game.levels.size() == 30, "free play should build 30 variants")
_check(bool(main.game.snapshot().get("free_mode", false)), "free snapshot should record the mode")
_check(save.load_board("campaign") == campaign_board, "free play should not overwrite the campaign board")
main.game._on_solved()
await process_frame
_check(save.rooms_completed() == 0, "free play should not write campaign progress")
_check(save.guest_visits("pepper") == 0, "free play should not write guest stories")
_check(main.game.win_next.text == "Next room", "free win should offer the next room")
main.game._on_undo()
# Returning to campaign after free play must clear the mode and record progress.
main.show_screen("home", false)
await process_frame
main.game.start_level(0, false, "")
await process_frame
_check(not main.game.free_mode, "campaign start should clear free mode")
_check(not bool(main.game.snapshot().get("free_mode", false)), "campaign snapshot should not be free")
main.game._on_solved()
await process_frame
_check(save.rooms_completed() == 1, "campaign win after free play should record progress")
main.game._on_undo()