diff --git a/sonic-radiance.love/game/modules/utils/init.lua b/sonic-radiance.love/game/modules/utils/init.lua new file mode 100644 index 0000000..870735b --- /dev/null +++ b/sonic-radiance.love/game/modules/utils/init.lua @@ -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