Back to TPG

TPG.Maps.ApplyCustomPoints

S🏷️ Custompoints

Part of TPG namespace

TPG.Maps.ApplyCustomPoints(config, mapName)
View on GitHub|gamemode/maps/sv_custom_points.lua:179-206
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Overlay a map's admin-placed points onto a freshly-loaded map config. Called from tpg.maps' Load right after it merges the map's inline config over the defaults, so placed points always win over what is authored in _loader.lua. Mutates config in place; returns nothing. Each category is independent and only touched if something was placed for it: a map with only custom spawns leaves config[GAMEMODE_CP] and config[GAMEMODE_KOTH] exactly as the inline config or defaults left them. When there ARE placed "cp" or "koth" points, the whole objective list for that mode is replaced wholesale (not merged) with the placed ones.

Parameters

NameTypeDescription
configtableThe merged map config to mutate (`TPG.Maps.Current`).
mapName?stringDefaults to the running map.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.