Saver
Index
Interfaces
Type Aliases
Functions
Interfaces
DefaultSavesFunction
Returns object
IHashSaver
getId
Returns number
setId
Parameters
id: number
Returns void
IObjectSaver
Interface that should be implemented to pass object as Saver.registerObjectSaver parameter.
read
Function that converts serialized data from saves scope to your object instance.
save
Function used to save serialized data of your object instance.
IScopeSaver
Interface that should be implemented to pass object as Saver.registerScopeSaver parameter.
optionalgetDefaultSaves
Function that returns default data to be passed to read if there is no previous data.
read
Function that loads data from saves scope.
save
Function used to save data.
ObjectLoadFunction
Parameters
obj: object
object data from saves
Returns SaveableObjectType
Instance of newly instantiated object.
ObjectSaveFunction
Parameters
instance: SaveableObjectType
instance of your object to be saved
Returns object
Object data to be serialized in saves scope.
ScopeLoadFunction
Parameters
scope: object
object data from saves
Returns void
ScopeSaveFunction
Returns object
Object data to be serialized in saves scope.
Type Aliases
SaveableObjectType
Functions
addSavesScope
Creates saves scope, a universal data storage container. This storage container should be used whenever you need to save some data between world sessions. If you want to store primitives, use an object to wrap them.
Module used to save data between world sessions, different worlds have their own saves.