feat: save games and edit scene darkness
Persist show state to local saves; author map darkness in scene editor with bake-to-scene and help updates. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -128,4 +128,20 @@ export class TimerSessionStore {
|
||||
};
|
||||
return this.state;
|
||||
}
|
||||
|
||||
/** Слепок: таймер на паузе, без абсолютного момента конца. */
|
||||
loadPaused(next: Pick<SessionTimerState, 'durationMs' | 'remainingMs' | 'visibleToPlayers' | 'layout'>): SessionTimerState {
|
||||
const durationMs = clampSessionTimerDurationMs(next.durationMs);
|
||||
const remainingMs = Math.max(0, Math.min(durationMs, Math.round(next.remainingMs)));
|
||||
this.state = {
|
||||
revision: this.state.revision + 1,
|
||||
durationMs,
|
||||
remainingMs,
|
||||
running: false,
|
||||
endsAt: null,
|
||||
visibleToPlayers: Boolean(next.visibleToPlayers),
|
||||
layout: clampSessionTimerLayout(next.layout),
|
||||
};
|
||||
return this.state;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user