remove manager postfixes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user