refactor: clean up unused panel overlay state and methods

This commit is contained in:
ginnoir
2026-06-11 21:29:44 -05:00
parent 232b84299c
commit 08d186f42e
3 changed files with 4 additions and 39 deletions
+2 -14
View File
@@ -159,7 +159,6 @@ export class GameRuntime {
for (const entry of entries) store.appendStoryLog(entry);
const choiceLabel = entries.at(-1)?.choiceLabel;
if (choiceLabel) store.appendLog(`Story: ${choiceLabel}`);
store.setStoryPanelOpen(false);
this.runPublishTriggers();
this.publish();
} catch (err) {
@@ -180,14 +179,6 @@ export class GameRuntime {
}
}
openStoryPanel(): void {
this.setActivePanel('story');
}
closeStoryPanel(): void {
this.setActivePanel('play');
}
continueStory(): void {
const state = this.state;
if (!state) return;
@@ -203,16 +194,14 @@ export class GameRuntime {
}
const prefs = store.prefs;
if (shouldAutoNavigateToStory(prefs, 'fork_choice', content)) {
store.setStoryPanelOpen(true);
store.setStoryHasUnread(false);
this.setActivePanel('story');
} else {
store.setStoryHasUnread(true);
store.setStoryPanelOpen(false);
}
this.publish();
return;
}
this.closeStoryPanel();
this.setActivePanel('play');
this.publish();
}
@@ -229,7 +218,6 @@ export class GameRuntime {
} else {
store.setStoryHasUnread(true);
}
store.setStoryPanelOpen(true);
} else if (effect.enteredNodeIds.length > 0) {
store.setStoryHasUnread(true);
}