Refactor platform UI and data flow across core pages
All checks were successful
Build Org Website / build (push) Successful in 50s

This commit is contained in:
gitea-actions
2026-07-30 12:22:44 +01:00
parent fe8acac707
commit a0c78929b3
45 changed files with 1168 additions and 348 deletions

9
assets/scripts/pages/princess-lima-state.js Normal file → Executable file
View File

@@ -53,12 +53,16 @@
openedChests: [],
unlockedRoutes: [],
rescued: false,
introSeen: false,
playTimeSeconds: 0,
settings: {
soundEnabled: false,
master: 0.8,
music: 0.45,
effects: 0.7,
voice: 0.85,
narrationEnabled: true,
subtitles: true,
reducedMotion: null,
screenShake: true,
highContrast: false,
@@ -147,12 +151,17 @@
openedChests: Array.isArray(candidate.openedChests) ? Array.from(new Set(candidate.openedChests.filter((id) => typeof id === "string"))).slice(0, 64) : [],
unlockedRoutes: unique(candidate.unlockedRoutes, ["village_defended", "guide_found", "ruins_complete", "briar_defeated", "bridge_repaired", "guardian_defeated", "emblem_found", "wards_broken", "malrec_defeated"]),
rescued: candidate.rescued === true,
// Existing v1 saves predate the cinematic and must continue directly.
introSeen: candidate.introSeen !== false,
playTimeSeconds: Math.floor(finite(candidate.playTimeSeconds, 0, 0, 999999)),
settings: {
soundEnabled: candidate.settings && candidate.settings.soundEnabled === true,
master: finite(candidate.settings && candidate.settings.master, 0.8, 0, 1),
music: finite(candidate.settings && candidate.settings.music, 0.45, 0, 1),
effects: finite(candidate.settings && candidate.settings.effects, 0.7, 0, 1),
voice: finite(candidate.settings && candidate.settings.voice, 0.85, 0, 1),
narrationEnabled: !(candidate.settings && candidate.settings.narrationEnabled === false),
subtitles: !(candidate.settings && candidate.settings.subtitles === false),
reducedMotion: candidate.settings && typeof candidate.settings.reducedMotion === "boolean" ? candidate.settings.reducedMotion : null,
screenShake: !(candidate.settings && candidate.settings.screenShake === false),
highContrast: candidate.settings && candidate.settings.highContrast === true,