refactor(engine): theme is a UI preference; remove it from GameState

Previously, clicking the theme button updated localStorage and the DOM but
not state.theme, so the engine's `theme` meta-verb toggled from stale state.
Theme is now exclusively UI/storage concern. Old saves with the field still
load; the field is silently ignored.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-09 13:33:57 -05:00
parent 657ed22b48
commit 14a58481b1
4 changed files with 7 additions and 8 deletions
-2
View File
@@ -30,7 +30,6 @@ export type ParsedCommand =
| { kind: 'unknown'; raw: string; reason: 'unknown-verb' | 'unknown-noun' | 'malformed' }
export type ResolveLevel = 'steady' | 'shaken' | 'reeling' | 'returning'
export type Theme = 'amber' | 'ansi'
export interface ItemInstance {
id: ItemId
@@ -68,7 +67,6 @@ export interface GameState {
pendingDisambiguation: PendingDisambiguation | null
/** Capped at 200 entries; older entries are dropped on append. */
transcript: TranscriptLine[]
theme: Theme
/** Set true when the player has reached an ending. UI shows ending screen. */
endedWith: 'true' | 'wrong' | 'bad' | null
}