feat(types): add SiteStep and refactor GameStep for new intro flow
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled

This commit is contained in:
Tom Boullay
2026-05-30 02:14:10 +02:00
parent 345d49f485
commit 4c5e2ed945
11 changed files with 42 additions and 508 deletions
+24 -11
View File
@@ -1,16 +1,24 @@
import type { GameStep, MainGameState } from "@/types/game";
import type { GameStep, MainGameState, SiteStep } from "@/types/game";
export const GAME_STEPS: readonly GameStep[] = [
"intro",
"start-intro",
/**
* Steps for the /site onboarding page
*/
export const SITE_STEPS: readonly SiteStep[] = [
"welcome",
"situation",
"naming",
"bienvenue",
"star-move",
"mission2",
"searching",
"helped",
"manipulation",
"outOfFabrik",
"transition",
];
/**
* Steps for the intro sequence (after /site, on / route)
*/
export const GAME_STEPS: readonly GameStep[] = [
"loading-map",
"video",
"dialogue-intro",
"reveal",
"playing",
];
export const MAIN_GAME_STATES: readonly MainGameState[] = [
@@ -21,9 +29,14 @@ export const MAIN_GAME_STATES: readonly MainGameState[] = [
"outro",
] as const;
const SITE_STEP_VALUES: ReadonlySet<string> = new Set(SITE_STEPS);
const GAME_STEP_VALUES: ReadonlySet<string> = new Set(GAME_STEPS);
const MAIN_GAME_STATE_VALUES: ReadonlySet<string> = new Set(MAIN_GAME_STATES);
export function isSiteStep(value: unknown): value is SiteStep {
return typeof value === "string" && SITE_STEP_VALUES.has(value);
}
export function isGameStep(value: unknown): value is GameStep {
return typeof value === "string" && GAME_STEP_VALUES.has(value);
}