remove manager postfixes
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-21 21:35:40 +01:00
parent f02bb75e4f
commit 1a4565428d
21 changed files with 37 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
MapManager.register({
Map.register({
id = "bedroom",
from_x = 0,
from_y = 0,

View File

@@ -1,6 +1,6 @@
local _maps = {}
function MapManager.get_maps_array()
function Map.get_maps_array()
local maps_array = {}
for _, map_data in pairs(_maps) do
table.insert(maps_array, map_data)
@@ -8,19 +8,19 @@ function MapManager.get_maps_array()
return maps_array
end
function MapManager.register(map_data)
function Map.register(map_data)
if _maps[map_data.id] then
trace("Warning: Overwriting map with id: " .. map_data.id)
end
_maps[map_data.id] = map_data
end
function MapManager.get_by_id(map_id)
function Map.get_by_id(map_id)
return _maps[map_id]
end
function MapManager.draw(map_id)
local map_data = MapManager.get_by_id(map_id)
function Map.draw(map_id)
local map_data = Map.get_by_id(map_id)
if not map_data then
return
end