Files
healer-man/src/game/dungeonRuntimeReset.ts
T
2026-08-14 15:56:39 -04:00

13 lines
366 B
TypeScript

type DungeonRuntimeReset = () => void;
const resetHandlers = new Set<DungeonRuntimeReset>();
export function registerDungeonRuntimeReset(handler: DungeonRuntimeReset): () => void {
resetHandlers.add(handler);
return () => resetHandlers.delete(handler);
}
export function clearDungeonRuntimeCaches(): void {
for (const handler of resetHandlers) handler();
}