section and within annotations for ldoc
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful

This commit is contained in:
2026-02-25 23:24:53 +01:00
parent 297ee8b622
commit 777c27aa54
27 changed files with 175 additions and 2 deletions

View File

@@ -1,8 +1,11 @@
-- Manages game maps.
--- @section Map
local _maps = {}
--- Gets all registered maps as an array.
--- @within Map
-- @return table An array of registered map data.
function Map.get_maps_array()
local maps_array = {}
@@ -13,6 +16,7 @@ function Map.get_maps_array()
end
--- Registers a map definition.
--- @within Map
-- @param map_data table The map data table.
function Map.register(map_data)
if _maps[map_data.id] then
@@ -22,6 +26,7 @@ function Map.register(map_data)
end
--- Gets a map by ID.
--- @within Map
-- @param map_id string The ID of the map.
-- @return table The map data table or nil.
function Map.get_by_id(map_id)
@@ -29,6 +34,7 @@ function Map.get_by_id(map_id)
end
--- Draws a map.
--- @within Map
-- @param map_id string The ID of the map to draw.
function Map.draw(map_id)
local map_data = Map.get_by_id(map_id)