Header menu logo BaboonAPI

CustomSaveRegistry Module

Persistent data API

Used for persisting your mod data to disk.

Functions and values

Function or value Description

Attach info savers

Full Usage: Attach info savers

Parameters:
    info : PluginInfo - Plugin info instance, used to namespace save entries.
    savers : Map<string, ICustomSaveData<'a>> - Map of data keys to saveables

Helper function to easily add saveable objects.

Simpler method to attach saveables without worrying about side effects.

info : PluginInfo

Plugin info instance, used to namespace save entries.

savers : Map<string, ICustomSaveData<'a>>

Map of data keys to saveables

Register info attach

Full Usage: Register info attach

Parameters:

Register the saveable objects for your plugin.

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!

info : PluginInfo

Plugin info instance, used to namespace save entries.

attach : SaverCapability -> unit

Attachment callback, call SaverCapability.Attach to attach saveable objects.

RegisterDelegate (info, attach)

Full Usage: RegisterDelegate (info, attach)

Parameters:

Register the saveable objects for your plugin.

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!

info : PluginInfo

Plugin info instance, used to namespace save entries.

attach : Action<SaverCapability>

Attachment callback, call SaverCapability.Attach to attach saveable objects.

Type something to start searching.