Hierarchy

Constructors

  • Parameters

    • game: Game
    • waywardPreload: undefined | IWaywardPreload

    Returns default

Properties

game: Game
lastLoadedVersion: IVersionInfo

Accessors

  • get isLoading(): boolean
  • Returns boolean

Methods

  • Returns void

  • Parameters

    Returns void

  • Parameters

    • slot: number = ...
    • Optional target: number

    Returns Promise<undefined | number>

  • Parameters

    • slot: number
    • saveObject: ISaveObject
    • legacyDecompressAllProperties: boolean = false

    Returns void

  • Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • slot: number = ...

    Returns Promise<void>

  • Parameters

    • cleanup: boolean = true

    Returns void

  • Exports a saveObject into a Uint8Array format that can be used with importSave

    Parameters

    Returns Uint8Array

  • Exports the specified slot into a Uint8Array format that can be used with importSave

    Parameters

    • slot: number

    Returns Promise<Uint8Array>

  • Returns the index of the first free slot

    Returns Promise<number>

  • Parameters

    • cleanup: undefined | boolean
    • pretty: undefined | boolean
    • compress: true

    Returns Uint8Array

  • Parameters

    • Optional cleanup: boolean
    • Optional pretty: boolean
    • Optional compress: false

    Returns string

  • Gets the most recently saved slot

    Returns Promise<undefined | number>

  • Converts a Uint8Array into a SaveObject Used in conjection with exportSlotAsUint8Array / exportSaveObjectAsUint8Array

    Parameters

    • slot: number
    • data: Uint8Array

    Returns ISaveObject

  • Returns the indices of the used slots

    Returns Promise<number[]>

  • Gets the used slots, ordered by one of a few properties of the savedData in that slot

    Parameters

    Returns Promise<number[]>

  • Imports saves from multiple formats

    1. ISaveObject - games imported while joining a multiplayer server
    2. string - From legacy exported save games to files or to steam
    3. Uint8Array - From exported save games

    Returns

    the number of bytes the save takes up, or undefined, if an error occurs

    Parameters

    • slot: number
    • saveObject: string | Uint8Array | ISaveObject

    Returns Promise<undefined | number>

  • Returns Promise<void>

  • Returns boolean

  • Returns whether or not the slot is used

    Parameters

    • slot: number

    Returns Promise<boolean>

  • Returns whether or not it succeeded

    Parameters

    • slot: number

    Returns Promise<boolean>

  • Parameters

    • slot: number
    • keys: Set<string>

    Returns Promise<Record<string, any>>

  • Attempts to load all the given keys from the slot at once. Upon failure, instead loads each separately.

    Returns

    an object of results, and an object of errors, both indexed by the given keys.

    Parameters

    • slot: number
    • keys: Set<string>

    Returns Promise<{
        errors: Map<string, Error>;
        result: Record<string, any>;
    }>

  • Parameters

    • slots: number[]
    • keys: Set<string>

    Returns Promise<Map<number, Record<string, any>>>

  • Saves Keep this in sync with saveSynchronous

    Parameters

    • slot: number

    Returns Promise<undefined | ISaveInfo>

  • Returns the number of bytes the save takes up

    Parameters

    • slot: number
    • object: any
    • keys: Set<string>

    Returns Promise<number>

  • Saves synchronously Keep this in sync with save

    Parameters

    • slot: number

    Returns undefined | ISaveInfo

Generated using TypeDoc