Files
Basalt/Basalt/init.lua
Robert Jelic 636ed0001f Update init.lua
Accidentally changed package.path to nil in certain cases. Oopsie #fixed
2022-12-09 07:18:00 +01:00

18 lines
470 B
Lua

local curDir = fs.getDir(table.pack(...)[2]) or ""
local defaultPath = package.path
if not(packed)then
local format = "path;/path/?.lua;/path/?/init.lua;"
local main = format:gsub("path", curDir)
local objFolder = format:gsub("path", curDir.."/objects")
local libFolder = format:gsub("path", curDir.."/libraries")
package.path = main..objFolder..libFolder..defaultPath
end
local Basalt = require("main")
package.path = defaultPath
return Basalt