use Game.GameSettings instead of GetEnabledContentPackages
This commit is contained in:
@@ -33,7 +33,7 @@ else
|
||||
print("LUA LOADER: Only enabled mods will be executed. Lua/LuaSetup.lua")
|
||||
end
|
||||
|
||||
local enabledPackages = Game.GetEnabledContentPackages()
|
||||
local enabledPackages = Game.GameSettings.AllEnabledPackages
|
||||
|
||||
local function endsWith(str, suffix)
|
||||
return str:sub(-string.len(suffix)) == suffix
|
||||
@@ -55,14 +55,16 @@ if SERVER then
|
||||
|
||||
if not runDisabledMods then
|
||||
|
||||
for _, package in pairs(enabledPackages) do
|
||||
local d = package.path:gsub("\\", "/")
|
||||
d = d:gsub("/filelist.xml", "")
|
||||
for _, package in enabledPackages do
|
||||
if package then
|
||||
local d = package.path:gsub("\\", "/")
|
||||
d = d:gsub("/filelist.xml", "")
|
||||
|
||||
table.insert(modulePaths, (d .. "/Lua/?.lua"))
|
||||
table.insert(modulePaths, (d .. "/Lua/?.lua"))
|
||||
|
||||
if File.DirectoryExists(d .. "/Lua/Autorun") then
|
||||
runFolder(d .. "/Lua/Autorun")
|
||||
if File.DirectoryExists(d .. "/Lua/Autorun") then
|
||||
runFolder(d .. "/Lua/Autorun")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user