Fix ForcedAutorun being called two times in some cases

This commit is contained in:
EvilFactory
2022-10-03 13:12:59 -03:00
parent a3eff91c1a
commit 011ac43226
@@ -125,6 +125,7 @@ ProcessPackages(
ProcessPackages( ProcessPackages(
ContentPackageManager.LocalPackages, ContentPackageManager.LocalPackages,
function(pkg, pkgPath) function(pkg, pkgPath)
if not executedLocalPackages[pkg.Name] then
table.insert(package.path, pkgPath .. LUA_MOD_REQUIRE_PATH) table.insert(package.path, pkgPath .. LUA_MOD_REQUIRE_PATH)
local forcedAutorunPath = pkgPath .. LUA_MOD_FORCEDAUTORUN_PATH local forcedAutorunPath = pkgPath .. LUA_MOD_FORCEDAUTORUN_PATH
if File.DirectoryExists(forcedAutorunPath) then if File.DirectoryExists(forcedAutorunPath) then
@@ -132,6 +133,7 @@ ProcessPackages(
executedLocalPackages[pkg.Name] = true executedLocalPackages[pkg.Name] = true
end end
end end
end
) )
ProcessPackages( ProcessPackages(