Back to TPG

TPG.GetGameType

S🏷️ Gametypes

Part of TPG namespace

TPG.GetGameType(typeId)
View on GitHub|gamemode/config/sh_gametypes.lua:193-195
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Look up a game type definition. Never returns nil: an unknown id falls back to control points, so callers on the HUD path can read .name off the result without guarding. That also means a typo'd id shows up as a round that looks like CP rather than as an error, which is worth knowing when a new mode appears not to take effect.

Parameters

NameTypeDescription
typeIdnumberA `GAMEMODE_*` constant.

Returns

TypeDescription
tableThe definition; see the module summary for its fields.

Examples

No examples available.

Used In

No usages found in the codebase.