fixed content packages with different name than the folder name not working
This commit is contained in:
@@ -12,7 +12,7 @@ else
|
|||||||
print("LUA LOADER: Only enabled mods will be executed. Lua/MoonsharpSetup.lua")
|
print("LUA LOADER: Only enabled mods will be executed. Lua/MoonsharpSetup.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
local enabledPackages = Game.GetEnabledPackagesDirectlyFromFile()
|
local enabledPackages = Game.GetEnabledContentPackages()
|
||||||
|
|
||||||
local function endsWith(str, suffix)
|
local function endsWith(str, suffix)
|
||||||
return str:sub(-string.len(suffix)) == suffix
|
return str:sub(-string.len(suffix)) == suffix
|
||||||
@@ -34,9 +34,9 @@ local modulePaths = {}
|
|||||||
|
|
||||||
if not runDisabledMods then
|
if not runDisabledMods then
|
||||||
|
|
||||||
for _, packageName in pairs(enabledPackages) do
|
for _, package in pairs(enabledPackages) do
|
||||||
d = packageName:gsub("\\", "/")
|
local d = package.path:gsub("\\", "/")
|
||||||
d = "Mods/" .. d
|
d = d:gsub("/filelist.xml", "")
|
||||||
|
|
||||||
table.insert(modulePaths, (d .. "/Lua/?.lua"))
|
table.insert(modulePaths, (d .. "/Lua/?.lua"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user