Release Healer Man 0.1.39

This commit is contained in:
phenom committed 2026-09-13 11:07:56 -04:00
1 parent b417b7c3c3
commit ed0d2fea3d
51 files changed
+17811 -49

No files matched your search

+5
View File
@@ -1,6 +1,7 @@
import type { DungeonEncounterSnapshot } from "./dungeonEncounterTypes";
import { DUNGEON_ENCOUNTER_SNAPSHOT_SCHEMA_VERSION } from "./dungeonEncounterTypes";
import type { Vector3Tuple, WorldSpawn } from "./dungeonTypes";
import { normalizeDungeonRunProgress, type DungeonRunProgress } from "./dungeonRunTypes";
// Version 1 snapshots sorted consumed action ids and cannot be migrated
// reliably when multiple durable actions write the same state slot. Failing
@@ -15,6 +16,7 @@ export interface DungeonRunCheckpoint {
readonly spawn: WorldSpawn;
readonly encounters: readonly DungeonEncounterSnapshot[];
readonly savedAt: number;
readonly run?: DungeonRunProgress;
}
function finiteVector(value: unknown): Vector3Tuple | null {
@@ -115,6 +117,8 @@ export function normalizeDungeonRunCheckpoint(value: unknown): DungeonRunCheckpo
) return null;
const encounters = input.encounters.map(normalizeSnapshot);
if (encounters.some((entry) => entry === null)) return null;
const run = input.run === undefined ? undefined : normalizeDungeonRunProgress(input.run);
if (run === null || (run && (run.dungeonId !== input.dungeonId || run.difficultyId !== input.difficultyId))) return null;
return Object.freeze({
version: DUNGEON_RUN_CHECKPOINT_VERSION,
dungeonId: input.dungeonId,
@@ -123,5 +127,6 @@ export function normalizeDungeonRunCheckpoint(value: unknown): DungeonRunCheckpo
spawn: { footPosition: position, yaw },
encounters: Object.freeze(encounters as DungeonEncounterSnapshot[]),
savedAt: input.savedAt,
...(run ? { run } : {}),
});
}