Skip to main content

GameConfigPicker

Provides an interface to query game configurations from assets in the world.

Functions

new

GameConfigPicker.new(
serviceBagServiceBag,
gameConfigBinderBinder<GameConfig>,
gameConfigAssetBinderBinder<GameConfigAsset>
) → GameConfigPicker

Constructs a new game config picker. Should be gotten by GameConfigService.

ObserveActiveAssetOfTypeBrio

GameConfigPicker:ObserveActiveAssetOfTypeBrio(assetTypestring) → Observable<Brio<GameConfigAssetBase>>

Observes active assets of a given type. Great for badge views or other things.

ObserveActiveAssetOfAssetTypeAndKeyBrio

GameConfigPicker:ObserveActiveAssetOfAssetTypeAndKeyBrio(
assetTypestring,
assetKeystring
) → Observable<Brio<GameConfigAssetBase>>

Observes all active assets of a type and key.

maid:GiveTask(picker:ObserveActiveAssetOfAssetTypeAndKeyBrio(GameConfigAssetType.BADGE, "myBadge")
	:Pipe({
		RxStateStackUtils.topOfStack();
	}):Subscribe(function(activeBadge)
		print(activeBadge:GetId())
	end)

ObserveActiveAssetOfAssetTypeAndIdBrio

GameConfigPicker:ObserveActiveAssetOfAssetTypeAndIdBrio(
assetTypestring,
assetIdnumber
) → Observable<Brio<GameConfigAssetBase>>

Observes all active assets of a type and an id.

ObserveActiveAssetOfAssetIdBrio

GameConfigPicker:ObserveActiveAssetOfAssetIdBrio(assetIdnumber) → Observable<Brio<GameConfigAssetBase>>

Observes all active assets of an id

ObserveActiveAssetOfKeyBrio

GameConfigPicker:ObserveActiveAssetOfKeyBrio(assetKeystring) → Observable<Brio<GameConfigAssetBase>>

Observes all active assets of a key

ObserveActiveConfigsBrio

GameConfigPicker:ObserveActiveConfigsBrio() → Observable<Brio<GameConfigAssetBase>>

Observes all active active assets

GetActiveConfigs

GameConfigPicker:GetActiveConfigs() → {GameConfigAssetBase}

Gets all active configs that exist

FindFirstActiveAssetOfId

GameConfigPicker:FindFirstActiveAssetOfId(
assetTypestring,
assetIdnumber
) → GameConfigAssetBase

Find the first asset of a given id

PromisePriceInRobux

GameConfigPicker:PromisePriceInRobux(
assetTypestring,
assetIdOrKeystring | number
) → GameConfigAssetBase

Find the first asset of a given key

FindFirstActiveAssetOfKey

GameConfigPicker:FindFirstActiveAssetOfKey(
assetTypestring,
assetKeystring
) → GameConfigAssetBase

Find the first asset of a given key

GetAllActiveAssetsOfType

GameConfigPicker:GetAllActiveAssetsOfType(assetTypestring) → {GameConfigAssetBase}

Gets all assets of a given type

ToAssetId

GameConfigPicker:ToAssetId(
assetTypeGameConfigAssetType,
assetIdOrKeynumber | string
) → number | nil

Converts an asset type and key to an id

ObserveToAssetIdBrio

GameConfigPicker:ObserveToAssetIdBrio(
assetTypeGameConfigAssetType,
assetIdOrKeynumber | string
) → Observable<Brio<number>>

Observes a converted asset type and key to an id

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new game config picker. Should be gotten by [GameConfigService].",
            "params": [
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag"
                },
                {
                    "name": "gameConfigBinder",
                    "desc": "",
                    "lua_type": "Binder<GameConfig>"
                },
                {
                    "name": "gameConfigAssetBinder",
                    "desc": "",
                    "lua_type": "Binder<GameConfigAsset>"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "GameConfigPicker"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 28,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "ObserveActiveAssetOfTypeBrio",
            "desc": "Observes active assets of a given type. Great for badge views or other things.",
            "params": [
                {
                    "name": "assetType",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<GameConfigAssetBase>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 57,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "ObserveActiveAssetOfAssetTypeAndKeyBrio",
            "desc": "Observes all active assets of a type and key.\n\n```lua\nmaid:GiveTask(picker:ObserveActiveAssetOfAssetTypeAndKeyBrio(GameConfigAssetType.BADGE, \"myBadge\")\n\t:Pipe({\n\t\tRxStateStackUtils.topOfStack();\n\t}):Subscribe(function(activeBadge)\n\t\tprint(activeBadge:GetId())\n\tend)\n```",
            "params": [
                {
                    "name": "assetType",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "assetKey",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<GameConfigAssetBase>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 84,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "ObserveActiveAssetOfAssetTypeAndIdBrio",
            "desc": "Observes all active assets of a type and an id.",
            "params": [
                {
                    "name": "assetType",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "assetId",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<GameConfigAssetBase>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 102,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "ObserveActiveAssetOfAssetIdBrio",
            "desc": "Observes all active assets of an id",
            "params": [
                {
                    "name": "assetId",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<GameConfigAssetBase>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 119,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "ObserveActiveAssetOfKeyBrio",
            "desc": "Observes all active assets of a key",
            "params": [
                {
                    "name": "assetKey",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<GameConfigAssetBase>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 136,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "ObserveActiveConfigsBrio",
            "desc": "Observes all active active assets",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<GameConfigAssetBase>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 152,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "GetActiveConfigs",
            "desc": "Gets all active configs that exist",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ GameConfigAssetBase }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 161,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "FindFirstActiveAssetOfId",
            "desc": "Find the first asset of a given id",
            "params": [
                {
                    "name": "assetType",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "assetId",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "GameConfigAssetBase"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 172,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "PromisePriceInRobux",
            "desc": "Find the first asset of a given key",
            "params": [
                {
                    "name": "assetType",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "assetIdOrKey",
                    "desc": "",
                    "lua_type": "string | number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "GameConfigAssetBase"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 192,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "FindFirstActiveAssetOfKey",
            "desc": "Find the first asset of a given key",
            "params": [
                {
                    "name": "assetType",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "assetKey",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "GameConfigAssetBase"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 230,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "GetAllActiveAssetsOfType",
            "desc": "Gets all assets of a given type",
            "params": [
                {
                    "name": "assetType",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ GameConfigAssetBase }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 249,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "ToAssetId",
            "desc": "Converts an asset type and key to an id",
            "params": [
                {
                    "name": "assetType",
                    "desc": "",
                    "lua_type": "GameConfigAssetType"
                },
                {
                    "name": "assetIdOrKey",
                    "desc": "",
                    "lua_type": "number | string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number | nil"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 278,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        },
        {
            "name": "ObserveToAssetIdBrio",
            "desc": "Observes a converted asset type and key to an id",
            "params": [
                {
                    "name": "assetType",
                    "desc": "",
                    "lua_type": "GameConfigAssetType"
                },
                {
                    "name": "assetIdOrKey",
                    "desc": "",
                    "lua_type": "number | string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Brio<number>>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 301,
                "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "GameConfigPicker",
    "desc": "Provides an interface to query game configurations from assets in the world.",
    "source": {
        "line": 5,
        "path": "src/gameconfig/src/Shared/Config/Picker/GameConfigPicker.lua"
    }
}