refactor: clean up unused panel overlay state and methods
This commit is contained in:
+2
-14
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user