Release Healer Man 0.1.39
This commit is contained in:
1 parent
b417b7c3c3
commit
ed0d2fea3d
51 files changed
+17811
-49
No files matched your search
@@ -6,6 +6,7 @@ import {
|
||||
} from "./dungeonEncounterRuntime";
|
||||
import { DUNGEON_RUN_CHECKPOINT_VERSION } from "./dungeonRunCheckpoint";
|
||||
import { useGameStore } from "./store";
|
||||
import { useDungeonRunStore } from "./dungeonRunStore";
|
||||
|
||||
function checkpointSignature(dungeonId: string): string {
|
||||
const game = useGameStore.getState();
|
||||
@@ -15,6 +16,7 @@ function checkpointSignature(dungeonId: string): string {
|
||||
difficultyId: game.activeDifficultyId,
|
||||
spawn: game.activeSpawn,
|
||||
encounters,
|
||||
run: useDungeonRunStore.getState().progress,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,10 +43,13 @@ export function DungeonRunCheckpointBridge() {
|
||||
spawn: game.activeSpawn,
|
||||
encounters,
|
||||
savedAt: Date.now(),
|
||||
run: useDungeonRunStore.getState().progress ?? undefined,
|
||||
});
|
||||
};
|
||||
save();
|
||||
return subscribeDungeonEncounterSnapshots(save);
|
||||
const unsubscribeEncounters = subscribeDungeonEncounterSnapshots(save);
|
||||
const unsubscribeRun = useDungeonRunStore.subscribe(save);
|
||||
return () => { unsubscribeEncounters(); unsubscribeRun(); };
|
||||
}, [activeCharacterId, phase]);
|
||||
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user