Skip to content

Commit 8acb673

Browse files
authored
small hotfix for source project
1 parent cfdca63 commit 8acb673

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Basalt/init.lua

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
local curDir = fs.getDir(table.pack(...)[2]) or ""
22

3-
local defaultPath = package.path
4-
local format = "%s;/%s/?.lua;/%s/?/init.lua"
5-
package.path = string.format(format, package.path, curDir,curDir)..string.format(format, package.path, curDir.."/libraries",curDir.."/libraries")..string.format(format, package.path, curDir.."/objects",curDir.."/objects")
3+
if not(packed)then
4+
local defaultPath = package.path
5+
local format = "path;/path/?.lua;/path/?/init.lua;"
66

7+
local main = format:gsub("path", curDir)
8+
local objFolder = format:gsub("path", curDir.."/objects")
9+
local libFolder = format:gsub("path", curDir.."/libraries")
10+
11+
12+
package.path = main..objFolder..libFolder..defaultPath
13+
end
714
local Basalt = require("main")
815
package.path = defaultPath
916

10-
return Basalt
17+
return Basalt

0 commit comments

Comments
 (0)