feat: add some map utils

This commit is contained in:
Kazhnuz 2019-07-26 17:36:25 +02:00
parent 37036760a3
commit 27cf265287

View file

@ -0,0 +1,19 @@
local gameutils = {}
function gameutils.getMapPath(maptype, mapname)
if (maptype ~= "battle") then
error("Map type " .. maptype .. " doesn't exist.")
end
return "datas.gamedata.maps." .. maptype .. "." .. mapname
end
function gameutils.getMapDirectory(maptype, mapname)
if (maptype ~= "battle") then
error("Map type " .. maptype .. " doesn't exist.")
end
return "datas/gamedata/maps/" .. maptype .. "/" .. mapname .. "/"
end
return gameutils