Skip to main content

BaseCustomSeat

Base class for a CustomSeat. Assumes seat and occupant can be anything.

Properties

maid

BaseCustomSeat.maid: Maid

currentOccupant

BaseCustomSeat.currentOccupant: any | nil

isEnabled

BaseCustomSeat.isEnabled: boolean

isOccupantLocked

BaseCustomSeat.isOccupantLocked: boolean

onIsEnabledChanged

BaseCustomSeat.onIsEnabledChanged: Signal<(isEnabledboolean) → nil>

onOccupantChanged

BaseCustomSeat.onOccupantChanged: Signal<(occupantany | nil) → nil>

maid

BaseCustomSeat.maid: Maid

Functions

new

Constructor
BaseCustomSeat.new() → BaseCustomSeat

Destroy

Deconstructor
BaseCustomSeat:Destroy() → ()

getCurrentOccupant

BaseCustomSeat:getCurrentOccupant() → any | nil

Returns the currentOccupant

getIsEnabled

BaseCustomSeat:getIsEnabled() → boolean

Returns isEnabled

getIsOccupantLocked

BaseCustomSeat:getIsOccupantLocked() → boolean

Returns isOccupantLocked

isOpen

BaseCustomSeat:isOpen() → boolean

Returns true if the currentOccupant is nil

isOccupied

BaseCustomSeat:isOccupied() → boolean

Returns true if the currentOccupant is not nil

isSeated

BaseCustomSeat:isSeated(occupantany) → boolean

Returns true if the given occupant matches this seat's current occupant

setCurrentOccupant

BaseCustomSeat:setCurrentOccupant(
newOccupantany | nil--

A value used to get the current character; Can be nil

) → ()

Sets the current occupant of this seat If self.isEnabled == false, then occupant WILL NOT be set.

setIsEnabled

BaseCustomSeat:setIsEnabled(valueboolean) → ()

Sets whether this seat is enabled

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "BaseCustomSeat"
                }
            ],
            "function_type": "static",
            "tags": [
                "Constructor"
            ],
            "source": {
                "line": 37,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "Destroy",
            "desc": "",
            "params": [],
            "returns": [],
            "function_type": "method",
            "tags": [
                "Deconstructor"
            ],
            "source": {
                "line": 53,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "getCurrentOccupant",
            "desc": "Returns the currentOccupant",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any | nil"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 62,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "getIsEnabled",
            "desc": "Returns isEnabled",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 68,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "getIsOccupantLocked",
            "desc": "Returns isOccupantLocked",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 74,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "isOpen",
            "desc": "Returns true if the `currentOccupant` is nil",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 80,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "isOccupied",
            "desc": "Returns true if the `currentOccupant` is not nil",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 86,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "isSeated",
            "desc": "Returns true if the given occupant matches this seat's current occupant",
            "params": [
                {
                    "name": "occupant",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 93,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "_setCurrentOccupant",
            "desc": "Internally sets the current occupant",
            "params": [
                {
                    "name": "newOccupant",
                    "desc": "",
                    "lua_type": "any | nil"
                }
            ],
            "returns": [],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 100,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "setCurrentOccupant",
            "desc": "Sets the current occupant of this seat\nIf `self.isEnabled == false`, then occupant WILL NOT be set.",
            "params": [
                {
                    "name": "newOccupant",
                    "desc": "A value used to get the current character; Can be nil",
                    "lua_type": "any | nil"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 114,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "setIsEnabled",
            "desc": "Sets whether this seat is enabled",
            "params": [
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 124,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "maid",
            "desc": "",
            "lua_type": "Maid",
            "source": {
                "line": 12,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "currentOccupant",
            "desc": "",
            "lua_type": "any | nil",
            "source": {
                "line": 15,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "isEnabled",
            "desc": "",
            "lua_type": "boolean",
            "source": {
                "line": 18,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "isOccupantLocked",
            "desc": "",
            "lua_type": "boolean",
            "source": {
                "line": 21,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "onIsEnabledChanged",
            "desc": "",
            "lua_type": "Signal<(isEnabled: boolean) -> nil>",
            "source": {
                "line": 24,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "onOccupantChanged",
            "desc": "",
            "lua_type": "Signal<(occupant: any | nil) -> nil>",
            "source": {
                "line": 27,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        },
        {
            "name": "maid",
            "desc": "",
            "lua_type": "Maid",
            "source": {
                "line": 30,
                "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
            }
        }
    ],
    "types": [],
    "name": "BaseCustomSeat",
    "desc": "Base class for a CustomSeat.\nAssumes seat and occupant can be anything.",
    "source": {
        "line": 9,
        "path": "src/shared/plugins/customSeat/shared/BaseCustomSeat.lua"
    }
}