Skip to main content

SaveSlotExportUtils

Pure helpers describing an exported save slot and the main-slot guard that keeps export/import away from the player's shared root datastore. See HasSaveSlots.PromiseExportSlot and HasSaveSlots.PromiseImportSlot.

Functions

isMainSlotIndex

SaveSlotExportUtils.isMainSlotIndex(slotIndexnumber) → boolean

Returns whether the given index is the main/default slot -- the one whose store is the player's shared root datastore (it shares that key with the SaveSlots system data and universe-scoped global data). Export/import refuse this index in both directions.

isSaveSlotExport

SaveSlotExportUtils.isSaveSlotExport(valueany) → boolean

Returns whether the value is a well-formed [SaveSlotExport].

create

SaveSlotExportUtils.create(
data{[string]any},
slotNamestring?,
summaryany?
) → SaveSlotExport

Builds a [SaveSlotExport] from a slot's data table and its metadata.

Show raw api
{
    "functions": [
        {
            "name": "isMainSlotIndex",
            "desc": "Returns whether the given index is the main/default slot -- the one whose store is the player's\nshared root datastore (it shares that key with the SaveSlots system data and universe-scoped\nglobal data). Export/import refuse this index in both directions.",
            "params": [
                {
                    "name": "slotIndex",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 33,
                "path": "src/saveslot/src/Shared/SaveSlotExportUtils.lua"
            }
        },
        {
            "name": "isSaveSlotExport",
            "desc": "Returns whether the value is a well-formed [SaveSlotExport].",
            "params": [
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 43,
                "path": "src/saveslot/src/Shared/SaveSlotExportUtils.lua"
            }
        },
        {
            "name": "create",
            "desc": "Builds a [SaveSlotExport] from a slot's data table and its metadata.",
            "params": [
                {
                    "name": "data",
                    "desc": "",
                    "lua_type": "{ [string]: any }"
                },
                {
                    "name": "slotName",
                    "desc": "",
                    "lua_type": "string?"
                },
                {
                    "name": "summary",
                    "desc": "",
                    "lua_type": "any?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "SaveSlotExport"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 64,
                "path": "src/saveslot/src/Shared/SaveSlotExportUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "SaveSlotExportUtils",
    "desc": "Pure helpers describing an exported save slot and the main-slot guard that keeps export/import\naway from the player's shared root datastore. See [HasSaveSlots.PromiseExportSlot] and\n[HasSaveSlots.PromiseImportSlot].",
    "source": {
        "line": 9,
        "path": "src/saveslot/src/Shared/SaveSlotExportUtils.lua"
    }
}