Skip to main content

LightingController

Controls the lighting in the game.

Functions

LoadSave

LightingController:LoadSave(
saveConfiguration,--

The Configuration object that holds all the properties of the lighting as attributes.

transitionTimenumber?--

The time it takes to transition to the new lighting.

) → ()

Loads a lighting save given a Configuration object that holds all the properties of the lighting as attributes. This will also load any children of the Configuration object that apply to the LightingChild type.

LoadDefault

LightingController:LoadDefault(
transitionTimenumber?--

The time it takes to transition from the current lighting settings to the default lighting settings.

) → ()

Used to load in the default lighting settings. These default settings are set by either having a LightingSave named DefaultLighting under Lighting or is automatically created at runtime.

ReturnToPrevious

LightingController:ReturnToPrevious(
transitionTimenumber?--

The time it takes to transition from the current lighting settings to the previous lighting settings.

) → ()

Returns to the previous lighting settings that were active before the last call to LoadSave.

GetAppliedFilters

LightingController:GetAppliedFilters() → {string}--

An array of the currently applied filter names.

Returns an array of the currently applied filters in stack order.

IsFilterApplied

LightingController:IsFilterApplied(
filterNamestring--

The name of the filter to check.

) → boolean--

Whether or not the filter is currently applied.

Checks if a filter is currently applied.

ApplyFilter

LightingController:ApplyFilter(
filterNamestring,--

The name of the filter to apply.

durationnumber?--

The time it takes to transition to the new filter settings.

) → ()

Applies a filter to the current lighting settings by pushing it onto the filter stack. The cumulative state is recomputed with all filters.

RemoveFilter

LightingController:RemoveFilter(
filterNamestring,--

The name of the filter to remove.

durationnumber?--

The time it takes to transition after removing the filter.

) → ()

Removes a filter from the filter stack by name and recomputes the cumulative state.

PopFilter

LightingController:PopFilter(
durationnumber?--

The time it takes to transition after popping the filter.

) → string?--

The name of the removed filter, or nil if the stack was empty.

Removes the most recently applied filter from the stack.

ResetCurrentProfile

LightingController:ResetCurrentProfile(
durationnumber?--

The time it takes to transition to the reset lighting settings.

) → ()

Resets the current lighting settings to the last loaded lighting save. This will also clear any applied filters from the stack.

ClearFilters

LightingController:ClearFilters(
durationnumber?--

The time it takes to transition after clearing filters.

) → ()

Clears all filters from the stack without resetting the lighting profile.

Show raw api
{
    "functions": [
        {
            "name": "_computeCumulativeState",
            "desc": "Computes the cumulative lighting state by applying all filters in the stack\nto the base lighting profile.",
            "params": [],
            "returns": [
                {
                    "desc": "A table containing the cumulative properties for all effects",
                    "lua_type": "CumulativeState?"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 149,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "_applyCumulativeState",
            "desc": "Applies the cumulative state to the actual lighting and effects.",
            "params": [
                {
                    "name": "cumulativeState",
                    "desc": "The computed cumulative state",
                    "lua_type": "CumulativeState"
                },
                {
                    "name": "transitionTime",
                    "desc": "The time to transition to the new state",
                    "lua_type": "number?"
                },
                {
                    "name": "overrideDurations",
                    "desc": "Optional table of property keys to durations that override computed durations",
                    "lua_type": "table?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 254,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "_createSave",
            "desc": "A private function used to generate a new LightingSave given the current\nLighting.",
            "params": [],
            "returns": [
                {
                    "desc": "The new LightingSave Configuration folder.",
                    "lua_type": "Configuration"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 449,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "LoadSave",
            "desc": "Loads a lighting save given a Configuration object that holds all the\nproperties of the lighting as attributes. This will also load any children\nof the Configuration object that apply to the `LightingChild` type.",
            "params": [
                {
                    "name": "save",
                    "desc": "The Configuration object that holds all the properties of the lighting as attributes.",
                    "lua_type": "Configuration"
                },
                {
                    "name": "transitionTime",
                    "desc": "The time it takes to transition to the new lighting.",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 506,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "LoadDefault",
            "desc": "Used to load in the default lighting settings. These default settings are\nset by either having a LightingSave named DefaultLighting under Lighting or\nis automatically created at runtime.",
            "params": [
                {
                    "name": "transitionTime",
                    "desc": "The time it takes to transition from the current lighting settings to the default lighting settings.",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 524,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "ReturnToPrevious",
            "desc": "Returns to the previous lighting settings that were active before the last\ncall to LoadSave.",
            "params": [
                {
                    "name": "transitionTime",
                    "desc": "The time it takes to transition from the current lighting settings to the previous lighting settings.",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 539,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "GetAppliedFilters",
            "desc": "Returns an array of the currently applied filters in stack order.",
            "params": [],
            "returns": [
                {
                    "desc": "An array of the currently applied filter names.",
                    "lua_type": "{ string }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 552,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "IsFilterApplied",
            "desc": "Checks if a filter is currently applied.",
            "params": [
                {
                    "name": "filterName",
                    "desc": "The name of the filter to check.",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "Whether or not the filter is currently applied.",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 566,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "ApplyFilter",
            "desc": "Applies a filter to the current lighting settings by pushing it onto the\nfilter stack. The cumulative state is recomputed with all filters.",
            "params": [
                {
                    "name": "filterName",
                    "desc": "The name of the filter to apply.",
                    "lua_type": "string"
                },
                {
                    "name": "duration",
                    "desc": "The time it takes to transition to the new filter settings.",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 582,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "RemoveFilter",
            "desc": "Removes a filter from the filter stack by name and recomputes the cumulative\nstate.",
            "params": [
                {
                    "name": "filterName",
                    "desc": "The name of the filter to remove.",
                    "lua_type": "string"
                },
                {
                    "name": "duration",
                    "desc": "The time it takes to transition after removing the filter.",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 610,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "PopFilter",
            "desc": "Removes the most recently applied filter from the stack.",
            "params": [
                {
                    "name": "duration",
                    "desc": "The time it takes to transition after popping the filter.",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "The name of the removed filter, or nil if the stack was empty.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 675,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "ResetCurrentProfile",
            "desc": "Resets the current lighting settings to the last loaded lighting save.\nThis will also clear any applied filters from the stack.",
            "params": [
                {
                    "name": "duration",
                    "desc": "The time it takes to transition to the reset lighting settings.",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 696,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        },
        {
            "name": "ClearFilters",
            "desc": "Clears all filters from the stack without resetting the lighting profile.",
            "params": [
                {
                    "name": "duration",
                    "desc": "The time it takes to transition after clearing filters.",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 712,
                "path": "src/client/core/tasks/LightingController.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "LightingController",
    "desc": "Controls the lighting in the game.",
    "source": {
        "line": 20,
        "path": "src/client/core/tasks/LightingController.luau"
    }
}