ax.zones¶
Source: gamemode/modules/zones/libraries/sh_zones.lua
Zone system core library.
Documented functions: 9
Functions¶
ax.zones:Add(spec)ax.zones:Clear()ax.zones:Get(identifier)ax.zones:GetAll()ax.zones:GetType(typeName)ax.zones:RegisterType(typeName, impl)ax.zones:Remove(identifier)ax.zones:Update(identifier, patch)ax.zones:ValidateSpec(spec)
ax.zones:Add(spec)¶
Add a new zone to the registry.
Realm: server
Returns
number|nil: id The assigned zone ID, or nil on failurestring|nil: error Error message if addition failed
ax.zones:Clear()¶
Clear all zones (runtime only).
Realm: server
ax.zones:Get(identifier)¶
Get a zone by ID or name.
Realm: shared
Returns
table|nil: The zone spec or nil if not found
ax.zones:GetAll()¶
Get all zones.
Realm: shared
Returns
table: Table of zone IDs mapped to zone specs
ax.zones:GetType(typeName)¶
Get a registered zone type implementation.
Realm: shared
Returns
table|nil: The type implementation or nil if not found
ax.zones:RegisterType(typeName, impl)¶
Register a zone type with validation and containment logic.
Realm: shared
Usage
ax.zones:RegisterType("box", { Validate = function(spec) ... end, Contains = function(spec, pos) ... end })
ax.zones:Remove(identifier)¶
Remove a zone from the registry.
Realm: server
Returns
boolean: success Whether the removal succeeded
ax.zones:Update(identifier, patch)¶
Update an existing zone.
Realm: server
Returns
boolean: success Whether the update succeeded
ax.zones:ValidateSpec(spec)¶
Validate a zone spec against its type implementation.
Realm: shared
Returns
boolean: success Whether validation passedstring|nil: error Error message if validation failed