Skip to main content

GameProductCmdrTypeUtils

Registers the shared cmdr enum types used by the game product commands. These must be registered on both the server (so commands validate and parse) and the client (so cmdr can autocomplete them), mirroring how GameConfigCmdrUtils registers the asset id types.

Properties

OwnableAssetTypeName

GameProductCmdrTypeUtils.OwnableAssetTypeName: "ownableAssetType"

The name of the ownable-asset-type enum cmdr type.

OwnershipStateName

GameProductCmdrTypeUtils.OwnershipStateName: "ownershipState"

The name of the ownership-state enum cmdr type.

OwnableAssetIdOrKeyName

GameProductCmdrTypeUtils.OwnableAssetIdOrKeyName: "ownableAssetIdOrKey"

The name of the ownable-asset id/key cmdr type. Autocompletes asset keys across all ownable asset types (a union -- it is not filtered by the command's chosen AssetType, since cmdr types cannot read sibling arguments) and also accepts raw numeric ids.

OwnershipStates

GameProductCmdrTypeUtils.OwnershipStates: {
"own",
"disown",
"clear"
}

Ownership override states accepted by the set-ownership command.

Functions

registerTypes

GameProductCmdrTypeUtils.registerTypes(
cmdrCmdr,
configPickerGameConfigPicker
) → ()

Registers the game product cmdr types. Safe to call once per cmdr registry (server and each client). Registering a duplicate type name throws, so this should only be called from a single service on each realm.

Show raw api
{
    "functions": [
        {
            "name": "registerTypes",
            "desc": "Registers the game product cmdr types. Safe to call once per cmdr registry (server and each\nclient). Registering a duplicate type name throws, so this should only be called from a\nsingle service on each realm.",
            "params": [
                {
                    "name": "cmdr",
                    "desc": "",
                    "lua_type": "Cmdr"
                },
                {
                    "name": "configPicker",
                    "desc": "",
                    "lua_type": "GameConfigPicker"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 111,
                "path": "src/gameproductservice/src/Shared/Cmdr/GameProductCmdrTypeUtils.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "OwnableAssetTypeName",
            "desc": "The name of the ownable-asset-type enum cmdr type.",
            "lua_type": "\"ownableAssetType\"",
            "source": {
                "line": 21,
                "path": "src/gameproductservice/src/Shared/Cmdr/GameProductCmdrTypeUtils.lua"
            }
        },
        {
            "name": "OwnershipStateName",
            "desc": "The name of the ownership-state enum cmdr type.",
            "lua_type": "\"ownershipState\"",
            "source": {
                "line": 28,
                "path": "src/gameproductservice/src/Shared/Cmdr/GameProductCmdrTypeUtils.lua"
            }
        },
        {
            "name": "OwnableAssetIdOrKeyName",
            "desc": "The name of the ownable-asset id/key cmdr type. Autocompletes asset keys across all ownable\nasset types (a union -- it is not filtered by the command's chosen AssetType, since cmdr\ntypes cannot read sibling arguments) and also accepts raw numeric ids.",
            "lua_type": "\"ownableAssetIdOrKey\"",
            "source": {
                "line": 37,
                "path": "src/gameproductservice/src/Shared/Cmdr/GameProductCmdrTypeUtils.lua"
            }
        },
        {
            "name": "OwnershipStates",
            "desc": "Ownership override states accepted by the `set-ownership` command.",
            "lua_type": "{ \"own\", \"disown\", \"clear\" }",
            "source": {
                "line": 55,
                "path": "src/gameproductservice/src/Shared/Cmdr/GameProductCmdrTypeUtils.lua"
            }
        }
    ],
    "types": [],
    "name": "GameProductCmdrTypeUtils",
    "desc": "Registers the shared cmdr enum types used by the game product commands. These must be\nregistered on both the server (so commands validate and parse) and the client (so cmdr can\nautocomplete them), mirroring how [GameConfigCmdrUtils] registers the asset id types.",
    "source": {
        "line": 9,
        "path": "src/gameproductservice/src/Shared/Cmdr/GameProductCmdrTypeUtils.lua"
    }
}