Rework story engine flow and reorganize project docs
Some checks failed
CI / verify (push) Has been cancelled
Some checks failed
CI / verify (push) Has been cancelled
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
buildTreasureResultText,
|
||||
resolveTreasureReward,
|
||||
} from '../data/treasureInteractions';
|
||||
import { appendStoryEngineCarrierMemory } from '../services/storyEngine/echoMemory';
|
||||
import { Character, Encounter, GameState, StoryMoment, StoryOption } from '../types';
|
||||
import type {CommitGeneratedState} from './generatedState';
|
||||
|
||||
@@ -51,11 +52,11 @@ export function useTreasureFlow({
|
||||
? gameState
|
||||
: progressTreasureQuest(gameState, gameState.currentScenePreset?.id ?? null);
|
||||
|
||||
const nextState: GameState = {
|
||||
const nextState: GameState = appendStoryEngineCarrierMemory({
|
||||
...progressedState,
|
||||
currentEncounter: null,
|
||||
npcInteractionActive: false,
|
||||
sceneMonsters: [],
|
||||
sceneHostileNpcs: [],
|
||||
playerX: 0,
|
||||
playerFacing: 'right' as const,
|
||||
animationState: progressedState.animationState,
|
||||
@@ -80,7 +81,7 @@ export function useTreasureFlow({
|
||||
sparPlayerHpBefore: null,
|
||||
sparPlayerMaxHpBefore: null,
|
||||
sparStoryHistoryBefore: null,
|
||||
};
|
||||
}, reward?.items ?? []);
|
||||
|
||||
void commitGeneratedState(
|
||||
nextState,
|
||||
|
||||
Reference in New Issue
Block a user