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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user