feat: guest stories, accessibility and cozy events

v0.9.0-alpha local build. Adds per-guest story vignettes, a scrollable Guest Book story section, live text scaling, Android haptics, a difficulty picker with descriptions, six repeating cosmetic hotel events, and isolated free play using verified symmetry variants. Save format v7 with automatic migration. QA is 9/9 including the free-play uniqueness suite.
This commit is contained in:
Ratdoku Builder committed 2026-12-05 16:44:39 -06:00
1 parent e0fd33c25e
commit 9e2776f7c4
27 files changed
+1559 -99

No files matched your search

+91 -2
View File
@@ -49,6 +49,7 @@ func _run() -> void:
await _test_daily(main, save)
await _test_campaign(main, save)
await _test_guest_book(main)
await _test_v09(main, save)
await _test_back(main)
await _test_reset_fallback(main, save)
_restore_defaults(save)
@@ -116,9 +117,20 @@ func _test_settings(main, save) -> void:
_check(main.music_player.playing, "music should play when enabled")
_check(main.settings_sheet.music_volume_slider != null, "music volume slider missing")
_check(main.settings_sheet.difficulty_button.text.find("Difficulty") >= 0, "difficulty control missing")
main.settings_sheet._cycle_difficulty()
_check(str(save.get_setting("difficulty")) == "zen", "difficulty should cycle to zen first")
main.settings_sheet.difficulty_button.pressed.emit()
_check(main.settings_sheet.difficulty_layer.visible, "difficulty picker should open")
_check(main.settings_sheet.difficulty_grid.get_child_count() == 3, "difficulty picker should show all modes")
_check(main.settings_sheet.difficulty_grid.get_child(0).mouse_filter == Control.MOUSE_FILTER_PASS, "difficulty cards should pass swipes")
main.settings_sheet._set_pending_difficulty("zen")
main.settings_sheet._apply_difficulty()
_check(str(save.get_setting("difficulty")) == "zen", "difficulty should apply Zen")
_check(not main.settings_sheet.difficulty_layer.visible, "difficulty picker should close after apply")
save.set_setting("difficulty", "normal")
_check(toggles.has("haptics"), "haptics toggle missing")
main.settings_sheet._cycle_ui_scale()
_check(is_equal_approx(float(save.get_setting("ui_scale")), 1.15), "text size should cycle")
_check(main.settings_sheet.ui_scale_button.text.find("Large") >= 0, "text size label should update")
save.set_setting("ui_scale", 1.0)
_check(main.background_rect.texture != null, "wallpaper texture should load")
main.settings_sheet._open_wallpaper_picker()
_check(main.settings_sheet.wallpaper_layer.visible, "wallpaper picker should open")
@@ -464,6 +476,78 @@ func _solve_board(game, label: String) -> void:
await process_frame
func _test_v09(main, save) -> void:
main.show_screen("home", false)
await process_frame
_check(int(save.data.get("version", 0)) == 7, "save should migrate to v7")
_check(save.data.has("guest_notes") and save.data.has("events"), "v7 save keys should exist")
var stories_ok := true
for guest in Guests.all():
var stories: Array = guest.get("stories", [])
if stories.size() != 3:
stories_ok = false
break
for line in stories:
if str(line).strip_edges().is_empty():
stories_ok = false
_check(stories_ok, "every guest should have three story lines")
save.data["guest_notes"] = {}
save.data["unlocked_guests"] = []
save.data["completed_rooms"] = []
save.save_game()
_check(save.story_line_count("pepper") == 0, "locked guest story should stay hidden")
save.data["unlocked_guests"] = ["pepper"]
save.save_game()
_check(save.story_line_count("pepper") == 1, "new guest should reveal the intro")
for i in range(3):
save.record_guest_visit("pepper")
_check(save.story_line_count("pepper") == 2, "third visit should reveal the second line")
for i in range(4):
save.record_guest_visit("pepper")
_check(save.story_line_count("pepper") == 3, "seventh visit should reveal the final line")
main.guest_book._show_detail(Guests.by_id("pepper"))
await process_frame
_check(main.guest_book.detail_story_box.get_child_count() >= 3, "guest detail should show the story")
main.guest_book.detail_layer.visible = false
var events: Array = save.event_defs()
_check(events.size() == 6, "six hotel events should load")
var event: Dictionary = save.current_event()
_check(not event.is_empty(), "current event should resolve")
var id := str(event.get("id", ""))
_check(not id.is_empty() and int(event.get("duration_days", 0)) >= 3, "current event should be well formed")
save.data["events"] = {}
save.save_game()
_check(save.event_progress(id) == 0, "event progress should start at zero")
save.record_daily_event_progress("2026-12-01")
save.record_daily_event_progress("2026-12-01")
save.record_daily_event_progress("2026-12-02")
save.record_daily_event_progress("2026-12-03")
_check(save.event_progress(id) == 3, "a daily room should count once per day")
_check(save.event_claimable(id), "event gift should be claimable")
_check(save.claim_event(id), "event gift should claim")
_check(save.claimed_event_frames().has(str(event.get("reward_frame", ""))), "event frame should unlock")
save.data["completed_rooms"] = []
save.data["unlocked_guests"] = []
save.data["guest_notes"] = {}
save.save_game()
main.show_screen("game", false)
await process_frame
main.game.start_free(1234)
await process_frame
_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")
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")
main.game._on_undo()
func _restore_defaults(save) -> void:
save.reset_progress()
save.data["daily"] = save._default_daily()
@@ -479,6 +563,11 @@ func _restore_defaults(save) -> void:
save.set_setting("sfx", true)
save.set_setting("sfx_volume", 0.8)
save.set_setting("difficulty", "normal")
save.set_setting("ui_scale", 1.0)
save.set_setting("haptics", true)
save.data["avatar_id"] = "crumb"
save.data["guest_notes"] = {}
save.data["events"] = {}
save.set_player_name("Innkeeper")
save.data["achievements"] = {}
save.data["gift_claimed"] = []