This commit is contained in:
2026-04-28 02:05:12 +08:00
parent 271db02e4a
commit 1eb090e4a5
39 changed files with 2671 additions and 165 deletions

View File

@@ -10,7 +10,9 @@ export type RpgRuntimeAppIntent =
token: number;
kind: 'custom-world';
profile: CustomWorldProfile;
mode?: 'play' | 'test';
mode?: 'play';
disablePersistence?: boolean;
exitToResult?: boolean;
}
| {
token: number;
@@ -37,6 +39,7 @@ export function RpgRuntimeApp({
if (initialIntent.kind === 'custom-world') {
gameShellProps.entry.handleCustomWorldSelect(initialIntent.profile, {
mode: initialIntent.mode ?? 'play',
disablePersistence: initialIntent.disablePersistence,
});
return;
}
@@ -44,7 +47,16 @@ export function RpgRuntimeApp({
gameShellProps.entry.handleContinueGame(initialIntent.snapshot);
}, [gameShellProps.entry, initialIntent]);
return <RpgRuntimeShell {...gameShellProps} onExitTestRuntime={onExitRuntime} />;
return (
<RpgRuntimeShell
{...gameShellProps}
onExitRuntimePreview={onExitRuntime}
showRuntimePreviewExit={
initialIntent?.kind === 'custom-world' &&
initialIntent.exitToResult === true
}
/>
);
}
export default RpgRuntimeApp;