lua now runs on sub editor, added Game.GetEnabledContentPackages back for compatibility and printerror

This commit is contained in:
Evil Factory
2022-04-10 18:58:25 -03:00
parent d5eb804de9
commit 96fdefb9ed
5 changed files with 18 additions and 2 deletions
+4 -2
View File
@@ -51,8 +51,11 @@ local function runFolder(folder, rootFolder, package)
local s = search[i]:gsub("\\", "/")
if endsWith(s, ".lua") then
executeProtected(s, rootFolder)
print(string.format("%s: Executing %s", package.Name, getFileName(s)))
local ok, result = pcall(executeProtected, s, rootFolder)
if not ok then
printerror(result)
end
end
end
@@ -103,7 +106,6 @@ for package in allPackages do
end
end
setmodulepaths(modulePaths)
Hook.Add("stop", "luaSetup.stop", function ()