updateSave beta
Function of @v12-engine/engine
ts
export declare function updateSave(data: unknown, registry: Registry, options?: {
anyVersion?: boolean;
}): WorldSave;A save as the game reads it now, whatever it was saved by: brought up from an older version by the game's (Rules.saves.migrate), each one version at a time. loadWorld runs it; a tool that keeps saves up to date runs it by itself. The save handed in is not changed. Throws a SaveError, which says why, for one that cannot be read: another game's, newer than this game, of a version the game has no step from, made with other rules by a game that refuses those (anyVersion loads it all the same), or with something in it the game no longer has, all of which the error names