Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ISaveManager

Hierarchy

  • ISaveManager

Implemented by

Index

Methods

compressSave

  • compressSave(slot: number, saveObject: SaveObject, exporting?: boolean): void
  • Parameters

    • slot: number
    • saveObject: SaveObject
    • Optional exporting: boolean

    Returns void

decompressSave

  • decompressSave(slot: number, saveObject: SaveObject, importing?: boolean): void
  • Parameters

    • slot: number
    • saveObject: SaveObject
    • Optional importing: boolean

    Returns void

deleteAllData

  • deleteAllData(): Promise<void>
  • Returns Promise<void>

deleteAllSlots

  • deleteAllSlots(): Promise<boolean | undefined>
  • Returns Promise<boolean | undefined>

deleteSlot

  • deleteSlot(slot: number): Promise<boolean | undefined>
  • Parameters

    • slot: number

    Returns Promise<boolean | undefined>

exportSave

  • Parameters

    • slot: number

    Returns Promise<SaveObject>

getFirstFreeSlot

  • getFirstFreeSlot(): Promise<number>
  • Returns Promise<number>

getGameStateAsJson

  • getGameStateAsJson(): string
  • Returns string

getMostRecentSlot

  • getMostRecentSlot(): Promise<number>
  • Returns Promise<number>

getSaveCount

  • getSaveCount(): Promise<number>
  • Returns Promise<number>

getSlots

  • getSlots(): Promise<boolean[]>
  • Returns Promise<boolean[]>

getUsedSlots

  • getUsedSlots(): Promise<number[]>
  • Returns Promise<number[]>

getUsedSlotsSorted

  • Parameters

    Returns Promise<number[]>

importSave

  • importSave(slot: number, data: SaveObject | string): Promise<number | undefined>
  • Parameters

    Returns Promise<number | undefined>

initialize

  • initialize(): void
  • Returns void

isEnabled

  • isEnabled(): boolean
  • Returns boolean

isSlotUsed

  • isSlotUsed(slot: number): Promise<boolean>
  • Parameters

    • slot: number

    Returns Promise<boolean>

load

  • load(slot: number): Promise<boolean>
  • Parameters

    • slot: number

    Returns Promise<boolean>

loadPartial

  • Parameters

    • slot: number

    Returns Promise<SaveObject>

loadPartialData

  • loadPartialData(saveObject: SaveObject, object: any, key: string, saveObjectKey?: string, skipCompression?: boolean, importing?: boolean): void
  • Parameters

    • saveObject: SaveObject
    • object: any
    • key: string
    • Optional saveObjectKey: string
    • Optional skipCompression: boolean
    • Optional importing: boolean

    Returns void

loadPartialDataInside

  • loadPartialDataInside(saveObject: SaveObject, saveObjectKey: string, key?: string | undefined): any
  • Parameters

    • saveObject: SaveObject
    • saveObjectKey: string
    • Optional key: string | undefined

    Returns any

save

  • save(slot: number, unloading?: boolean): Promise<ISaveInfo>
  • Parameters

    • slot: number
    • Optional unloading: boolean

    Returns Promise<ISaveInfo>

savePartialData

  • savePartialData(slot: number, object: any, key: string, saveObjectKey: string): Promise<number>
  • Parameters

    • slot: number
    • object: any
    • key: string
    • saveObjectKey: string

    Returns Promise<number>

savePartialDataInside

  • savePartialDataInside(slot: number, saveObjectKey: string, key: string, value: any): Promise<number>
  • Parameters

    • slot: number
    • saveObjectKey: string
    • key: string
    • value: any

    Returns Promise<number>

Generated using TypeDoc