local littlehelper = {}
function littlehelper.requireSystems()
local systemTable = {}
local systemName
for k, v in ipairs(love.filesystem.getDirectoryItems("SimpleElementSystem.Systems")) do
print("Love")
systemName = "SimpleElementSystem.Systems." .. v:gsub("%.lua", "")
table.insert(systemTable, require(systemName))
end
return systemTable --intendation of this return good ?
end
return littlehelper
As far as I know, love.filesystem paths are in the format of path/to/file only, so path.to.file doesn't work.
You may also want to be mindful of the exact casing on folder and file names; for example running code on Windows works fine if you mix the cases, but will fail when running from a .love or fused executable.