Skip to main content

View as Markdown · AI documentation index

Function: loadGameIntoState()

loadGameIntoState(slot): Promise<SaveResult>

Defined in: packages/core/src/saves/hooks/useLoadGame.ts:18

Loads the save in a slot, applying migrations when it predates the current game version.

Parameters​

slot​

Slot to load, not the save's database id

string | number

Returns​

Promise<SaveResult>

The outcome of the load

Remarks​

Shared by useLoadGame and useLastLoadGame so that both paths into a save run the same migrations.