TPG.Gear.FallbackAllowed(category, id)📋 Has LDoc👁️ 0 viewsUpdated 1 month ago
Description
Whether an item is a legal FALLBACK for a slot -- what you get when the pick in that slot is refused. A fallback has to be free. If it were not, a refused Javelin could fall back to a Carl Gustaf that is itself mid-timer, and the slot would have to refuse again; the loadout code would then need a fallback for the fallback, with no obvious end to it. Free means one refusal always resolves. "none" is always legal, and in the Special slot it is not the same as "nothing" -- see FallbackLoadout in config/sh_weapons_config.lua. Shared so the menu greys out exactly what the server would reject, rather than offering a choice that silently does not take.
Parameters
| Name | Type | Description |
|---|---|---|
category | string | `"Primary"`, `"Secondary"` or `"Special"`. |
id | string | A weapon class, or `"none"`. |
Returns
| Type | Description |
|---|---|
boolean | |
string | Why not, when false, in words a player can read. |
Examples
No examples available.
Used In
No usages found in the codebase.