Hierarchy

Constructors

  • Parameters

    • game: Game
    • waywardPreload: undefined | IWaywardPreload

    Returns default

Properties

event: IEventEmitter<default, ISaveManagerEvents>
game: Game
lastLoadedVersion: Info

Accessors

  • get isLoading(): boolean
  • Returns boolean

Methods

  • Returns void

  • Parameters

    Returns void

  • Parameters

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

    Returns Promise<{
        bytes: number;
    } | {
        error: SaveImportErrorReason;
    }>

  • Parameters

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

    Returns void

  • Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • slot: number = ...

    Returns Promise<void>

  • Parameters

    Returns boolean

  • 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

    • 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<{
        bytes: number;
    } | {
        error: SaveImportErrorReason;
    }>

  • 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>

  • Saves Keep this in sync with saveSynchronous

    Parameters

    • slot: number

    Returns Promise<undefined | ISaveInfo>

  • Returns the number of bytes the save takes up

    Parameters

    Returns Promise<number>

  • Saves synchronously Keep this in sync with save

    Parameters

    • slot: number

    Returns undefined | ISaveInfo

Generated using TypeDoc