feat(gameutils): handle different types of map directory

This commit is contained in:
Kazhnuz 2019-07-27 14:41:02 +02:00
parent fe8b71a0dc
commit a401bf1b27

View file

@ -2,7 +2,12 @@ local gameutils = {}
function gameutils.getMapPath(maptype, mapname)
local dir = gameutils.getMapDirectory(maptype, mapname)
local path = dir .. "map.lua"
local path = ""
if maptype == "sti" then
path = dir .. "map.lua"
else
path = "datas.gamedata.maps." .. maptype .. "." .. mapname
end
core.debug:print("game/utils", "path is " .. path)
return path
end