CustomSaveRegistry Module
Persistent data API
Used for persisting your mod data to disk.
Functions and values
Function or value | Description |
Full Usage:
Attach info savers
Parameters:
PluginInfo
-
Plugin info instance, used to namespace save entries.
savers : Map<string, ICustomSaveData<'a>>
-
Map of data keys to saveables
|
Simpler method to attach saveables without worrying about side effects.
|
Full Usage:
Register info attach
Parameters:
PluginInfo
-
Plugin info instance, used to namespace save entries.
attach : SaverCapability -> unit
-
Attachment callback, call
SaverCapability.Attach to attach saveable objects.
|
Note that the attach callback will be called multiple times, and thus should not have any side effects. This means you should avoid creating new ICustomSaveData instances inside the callback!
|
Full Usage:
RegisterDelegate (info, attach)
Parameters:
PluginInfo
-
Plugin info instance, used to namespace save entries.
attach : Action<SaverCapability>
-
Attachment callback, call
SaverCapability.Attach to attach saveable objects.
|
Note that the attach delegate will be called multiple times, and thus should not have any side effects. This means you should avoid creating new ICustomSaveData instances inside the delegate!
|