Skip to content

LoadWorldOptions beta ​

Interface of @v12-engine/engine

ts
export interface LoadWorldOptions extends WorldChecks

The engine's hook handlers without the ones the module does without, then the module's own

Members ​

anyVersion ​

ts
anyVersion?: boolean;

Loads a save made with other rules of the game (its code or its mods changed since) whatever the game says of those (Rules.saves.onMismatch). An older version of its saves is brought up to date all the same

components ​

ts
components?: readonly Component<unknown, unknown>[];

Components the app keeps in the world beside the game's own, as CreateWorldOptions.components: those of the world saved

log ​

ts
log?: Logger;

The logger the world's own is made under, as CreateWorldOptions.log

map ​

ts
map?: Pick<GameMap, 'definitions'>;

The map it is loaded on (a scene that opens its map again): its definitions are laid over the game's in place of those the save kept (GameMap.definitions). The save's own when left out

maps ​

ts
maps?: readonly GameMap[];

The maps a save's ground may be one of (S36): the game's own (Rules.maps) when left out

ts
navigation?: GameNavigationOptions;

Options for how the world's units find their way, over the game's (Rules.navigation)

onError ​

ts
onError?: ErrorPolicy;

What becomes of a part of the game that throws, as CreateWorldOptions.onError

rules ​

ts
rules: Rules;

The game module the save was made with, by id. A save holds no code: rules come from here