Added filesystem-compatible package loader to boot.lua script
This commit is contained in:
@@ -1,4 +1,16 @@
|
|||||||
|
|
||||||
|
-- Add filesystem-compatible package loader
|
||||||
|
table.insert(package.loaders, 1, function(modname)
|
||||||
|
modname = modname:gsub("%.", "/")
|
||||||
|
for x in package.path:gmatch("[^;]+") do
|
||||||
|
local filename = x:gsub("?", modname)
|
||||||
|
if love.filesystem.exists(filename) then
|
||||||
|
return assert(loadstring(love.filesystem.read(filename), "=" .. filename))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
function love.run()
|
function love.run()
|
||||||
-- Prepare arguments
|
-- Prepare arguments
|
||||||
local args = {}
|
local args = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user