feat(gameutils): handle different types of map directory
This commit is contained in:
parent
fe8b71a0dc
commit
a401bf1b27
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue