Skip to main content

AccessService

This item only works when running on the server. Server

Server entry point for the access package. Brings up the shared AccessDataService and the server-only pieces built on it, so a game starts access with one GetService instead of knowing which half of it lives where.

serviceBag:GetService(require("AccessService"))

Facts and features are still registered in shared code -- both realms have to agree on what exists, and a registration only the server ran is a fact the client can never resolve. This service exists to own the things that genuinely are server-only: overriding a fact, and replicating the result.

Functions

GetAccessPolicyService

AccessService.GetAccessPolicyService(selfAccessService) → AccessPolicyService

The policy registry, for a game registering or enabling its own consequences.

GetAccessDataService

AccessService.GetAccessDataService(selfAccessService) → AccessDataService

The shared registry, for a game registering its facts and features.

Show raw api
{
    "functions": [
        {
            "name": "GetAccessPolicyService",
            "desc": "The policy registry, for a game registering or enabling its own consequences.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AccessService"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AccessPolicyService"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 84,
                "path": "src/access/src/Server/AccessService.lua"
            }
        },
        {
            "name": "GetAccessDataService",
            "desc": "The shared registry, for a game registering its facts and features.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AccessService"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AccessDataService"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 93,
                "path": "src/access/src/Server/AccessService.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "AccessService",
    "desc": "Server entry point for the access package. Brings up the shared [AccessDataService] and the\nserver-only pieces built on it, so a game starts access with one `GetService` instead of knowing\nwhich half of it lives where.\n\n```lua\nserviceBag:GetService(require(\"AccessService\"))\n```\n\nFacts and features are still registered in shared code -- both realms have to agree on what exists,\nand a registration only the server ran is a fact the client can never resolve. This service exists to\nown the things that genuinely are server-only: overriding a fact, and replicating the result.",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 18,
        "path": "src/access/src/Server/AccessService.lua"
    }
}