This commit is contained in:
2026-04-27 22:50:18 +08:00
parent ded6f6ee2a
commit b6c6640548
77 changed files with 5240 additions and 833 deletions

View File

@@ -58,15 +58,17 @@ function getSceneTargetForFunction(
): GameState['currentScenePreset'] {
if (!worldType) return currentScenePreset;
if (option.functionId === 'idle_travel_next_scene') {
const targetSceneId =
typeof option.runtimePayload?.targetSceneId === 'string'
? option.runtimePayload.targetSceneId
const targetSceneId =
typeof option.runtimePayload?.targetSceneId === 'string'
? option.runtimePayload.targetSceneId
: typeof option.runtimePayload?.escapeTargetSceneId === 'string'
? option.runtimePayload.escapeTargetSceneId
: null;
if (targetSceneId) {
return getScenePresetById(worldType, targetSceneId) ?? currentScenePreset;
}
if (targetSceneId) {
return getScenePresetById(worldType, targetSceneId) ?? currentScenePreset;
}
if (option.functionId === 'idle_travel_next_scene') {
return getTravelScenePreset(worldType, currentScenePreset?.id) ?? currentScenePreset;
}
@@ -114,7 +116,7 @@ export function buildResolvedChoiceState(params: {
return {
optionKind,
battlePlan: null,
afterSequence: buildEscapeAfterSequence(state, option),
afterSequence: buildEscapeAfterSequence(state, option, nextScenePreset),
} satisfies ResolvedChoiceState;
}