feat(m1): PR3 T3.0 — shell UI, action kinds, story tab #16
+10
-1
@@ -87,6 +87,7 @@ export class GameRuntime {
|
||||
}
|
||||
document.removeEventListener('visibilitychange', this.visibilityChangeListener);
|
||||
window.removeEventListener('beforeunload', this.beforeUnloadListener);
|
||||
this.booted = false;
|
||||
}
|
||||
|
||||
performAction(actionId: string): void {
|
||||
@@ -196,7 +197,9 @@ export class GameRuntime {
|
||||
const store = useGameStore.getState();
|
||||
for (const entry of entries) store.appendStoryLog(entry);
|
||||
for (const entry of entries) {
|
||||
store.appendLog(`Story: ${content.storyNodesById[entry.nodeId]?.prose.slice(0, 40)}…`);
|
||||
store.appendLog(
|
||||
`Story: ${(content.storyNodesById[entry.nodeId]?.prose ?? '').slice(0, 40)}…`,
|
||||
);
|
||||
}
|
||||
const prefs = store.prefs;
|
||||
if (shouldAutoNavigateToStory(prefs, 'fork_choice', content)) {
|
||||
@@ -295,3 +298,9 @@ export class GameRuntime {
|
||||
}
|
||||
|
||||
export const gameRuntime = new GameRuntime();
|
||||
|
||||
if (import.meta.hot) {
|
||||
import.meta.hot.dispose(() => {
|
||||
gameRuntime.stop();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ export function processStoryTriggers(
|
||||
...logEntries.map((e) =>
|
||||
e.choiceLabel
|
||||
? `Story: ${e.choiceLabel}`
|
||||
: `Story: ${content.storyNodesById[e.nodeId]?.prose.slice(0, 40)}…`,
|
||||
: `Story: ${(content.storyNodesById[e.nodeId]?.prose ?? '').slice(0, 40)}…`,
|
||||
),
|
||||
];
|
||||
return { enteredNodeIds, logEntries, shouldOpenPanel, eventLogLines };
|
||||
|
||||
Reference in New Issue
Block a user