SavesController beta
Interface of @v12-engine/client
export interface SavesControllerThe saved games of a place: listed, loaded, deleted, and (while a game is played there) made. What the HUD's saves window and a campaign's menu show (client.saves, CampaignController.saves)
Members
canSave
canSave(): boolean;Whether the game being played can be saved here
checkpoint
readonly checkpoint?: Accessor<{
label: Message;
save: WorldSave;
} | undefined>;The rules' last checkpoint of the mission played here (world.checkpoint, campaign plan SV3), as the saves' store keeps it: the one this game made, or (the page opened again) one an earlier game of it made. Nothing where there is none
defaultName
defaultName(): string;What a save is called when no name is given: the place's name and the time in the game
list
readonly list: Accessor<SavedGameSummary[]>;The games saved, newest first: one the game no longer loads is among them, with why (problem)
load
load(id: string): Promise<string | undefined>;Opens a saved game: brought up to what the game reads now first, so that one that cannot be loaded says why here and what is being played goes on. Gives the words when it could not be, nothing when it is being opened
problem
problem(saved: SavedGameSummary): string | undefined;Why a save is not one to load, in words for a player (the game's, or the client's): from its header, or from having been opened and refused. Nothing for one that loads
refresh
refresh(): Promise<void>;Reads the list again
remove
remove(id: string): Promise<void>;Deletes a saved game, and reads the list again
said
readonly said: Accessor<string>;What the last thing done came to, in words: "Saved: The crossing, 4:07", or why it could not be. Empty after a list
save
save(name?: string): Promise<SavedGameSummary | undefined>;Saves the game being played, under a name or the usual one. What was saved, or nothing when it could not be (said says why)