1
This commit is contained in:
@@ -97,6 +97,8 @@ export function useRpgRuntimeStoryFlow({
|
||||
buildOpeningCampChatContext,
|
||||
resetPreparedOpeningAdventure,
|
||||
} = runtimeController;
|
||||
// 中文注释:interactionConfig 是“剧情交互协调器”的配置快照;
|
||||
// 后续选项刷新、动作提交、fallback 叙事都会共用这套上下文。
|
||||
const interactionConfig = createStoryInteractionCoordinatorConfig({
|
||||
gameState,
|
||||
setGameState,
|
||||
@@ -131,6 +133,8 @@ export function useRpgRuntimeStoryFlow({
|
||||
gameState,
|
||||
currentStory,
|
||||
});
|
||||
// 中文注释:这一层把“战斗/NPC/背包/地图旅行”等具体交互入口分发到对应流程,
|
||||
// 保证冒险面板只调用统一的 handleChoice / handleNpcChatInput 等接口。
|
||||
const {
|
||||
handleChoice,
|
||||
battleRewardUi,
|
||||
@@ -175,6 +179,7 @@ export function useRpgRuntimeStoryFlow({
|
||||
clearCharacterChatModal,
|
||||
});
|
||||
|
||||
// 中文注释:最终返回的是已经过目标选项协调、交互分发和 story state 收束后的稳定输出。
|
||||
return {
|
||||
displayedOptions,
|
||||
canRefreshOptions,
|
||||
|
||||
Reference in New Issue
Block a user