1
This commit is contained in:
@@ -151,6 +151,7 @@ export function useRpgRuntimeShellViewModel(
|
||||
gameState,
|
||||
currentStory,
|
||||
openingCampSceneId,
|
||||
onDeferredAutoChoice: (option) => handleChoice(option),
|
||||
});
|
||||
const {
|
||||
visibleGameState,
|
||||
@@ -222,12 +223,24 @@ export function useRpgRuntimeShellViewModel(
|
||||
const handleSceneTransitionChoice = useCallback(
|
||||
(option: StoryOption) => {
|
||||
const transitionMode = SCENE_TRANSITION_FUNCTION_MODES[option.functionId];
|
||||
if (transitionMode) {
|
||||
const shouldBeginTransition =
|
||||
transitionMode &&
|
||||
(option.functionId !== 'story_continue_adventure' ||
|
||||
Boolean(
|
||||
currentStory?.deferredAutoChoice ||
|
||||
currentStory?.deferredRuntimeState,
|
||||
));
|
||||
if (shouldBeginTransition) {
|
||||
beginSceneTransition(transitionMode);
|
||||
}
|
||||
handleChoice(option);
|
||||
},
|
||||
[beginSceneTransition, handleChoice],
|
||||
[
|
||||
beginSceneTransition,
|
||||
currentStory?.deferredAutoChoice,
|
||||
currentStory?.deferredRuntimeState,
|
||||
handleChoice,
|
||||
],
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user