refactor for shared states and multi chapters

This commit is contained in:
Dan 2026-01-22 11:03:05 +00:00
parent 691b809b41
commit b9bea16f78
13 changed files with 2308 additions and 1786 deletions

View file

@ -322,6 +322,19 @@ class SceneManager {
this.state.set(action.set, action.value);
}
// Set value in shared state (for series games)
if (action.setShared !== undefined) {
this.state.setShared(action.setShared, action.value);
}
// Mark a chapter as complete in shared state
if (action.markChapterComplete !== undefined) {
const sharedState = this.state.getSharedState();
if (sharedState) {
sharedState.markChapterComplete(action.markChapterComplete);
}
}
if (action.increment !== undefined) {
this.state.increment(action.increment, action.amount || 1);
}