diff --git a/FactorioSoftmodManager.lua b/FactorioSoftmodManager.lua index e48b16c8..1ff7d3ee 100644 --- a/FactorioSoftmodManager.lua +++ b/FactorioSoftmodManager.lua @@ -466,7 +466,9 @@ Manager.error = setmetatable({ rawset(tbl,'__crash',true) rawget(tbl,'__error_call')(err,2) end - rawget(tbl,'__error_call')(err,2) + local args = {...} + local trace = args[1] and type(args[1]) == 'number' and args[1] or 2 + rawget(tbl,'__error_call')(err,trace) end, __index=function(tbl,key) -- this allows the __error_handler to be called from many different names diff --git a/modules/ExpGamingCore/Group/softmod.json b/modules/ExpGamingCore/Group/softmod.json index 48a8c649..f5267c40 100644 --- a/modules/ExpGamingCore/Group/softmod.json +++ b/modules/ExpGamingCore/Group/softmod.json @@ -14,6 +14,7 @@ ], "dependencies": { "FactorioStdLib": "^0.8.0", + "ExpGamingCore.Server": "?^4.0.0", "ExpGamingLib": "^4.0.0" }, "collection": "ExpGamingCore_4.0.0" diff --git a/modules/ExpGamingCore/Role/control.lua b/modules/ExpGamingCore/Role/control.lua index f891dd91..8e7b40b4 100644 --- a/modules/ExpGamingCore/Role/control.lua +++ b/modules/ExpGamingCore/Role/control.lua @@ -167,7 +167,7 @@ end function Role.get_highest(options) local player = Game.get_player(options) if player then options = Role.get(player) end - if not type_error(options,'table','Invalid argument #1 to Role.highest, options is not a table of roles.') then return end + if not type_error(options,'table','Invalid argument #1 to Role.get_highest, options is not a table of roles.') then return end local highest_index = -1 local highest for _,role_name in pairs(options) do diff --git a/modules/WarpPoints/control.lua b/modules/WarpPoints/control.lua index ee241774..b199f309 100644 --- a/modules/WarpPoints/control.lua +++ b/modules/WarpPoints/control.lua @@ -21,6 +21,7 @@ local warp_item = 'discharge-defense-equipment' local global_offset = {x=0,y=0} -- Module Define +local _global = global local global local module_verbose = false local ThisModule = { @@ -31,7 +32,7 @@ local ThisModule = { } -- Global Define -global = global{ +global = _global{ warps={}, -- 0,0 is always a warp cooldowns={} } @@ -209,7 +210,7 @@ ThisModule.Gui = Gui.left{ -- Event Handlers Define script.on_event(defines.events.on_tick,function(event) if not (event.tick % 60 == 0) then return end - for index,time in pairs(_warps().cooldowns) do + for index,time in pairs(global.cooldowns) do if time > 0 then global.cooldowns[index] = time-1 if global.cooldowns[index] == 0 then player_return({'warp-system.cooldown-zero'},defines.textcolor.low,index) end diff --git a/modules/WornPaths/control.lua b/modules/WornPaths/control.lua index 9a7a8f92..babae922 100644 --- a/modules/WornPaths/control.lua +++ b/modules/WornPaths/control.lua @@ -5,7 +5,7 @@ -- @alais ThisModule -- Module Require -local Game = require('FactorioStdLib@^0.8.0') +local Game = require('FactorioStdLib.Game@^0.8.0') -- Local Varibles local entites = require(module_path..'/src/entites') diff --git a/modules/WornPaths/src/paths.lua b/modules/WornPaths/src/paths.lua index 1bcbd991..a41a7dfc 100644 --- a/modules/WornPaths/src/paths.lua +++ b/modules/WornPaths/src/paths.lua @@ -1,4 +1,4 @@ -local paths = { +return { -- ['tile name'] = {health,convert to} -- the greater health is the lower the chance it will be down graded, must be grater than 0 ['refined-concrete']={70,'concrete'}, diff --git a/modules/index.lua b/modules/index.lua index 868e7a90..a7b1217a 100644 --- a/modules/index.lua +++ b/modules/index.lua @@ -22,13 +22,13 @@ return { ['ExpGamingLib@^4.0.0']='./modules/ExpGamingLib', ['ExpGamingLib@4.0.0']='./modules/ExpGamingLib', ['ExpGamingCore.Command@^4.0.0']='./modules/ExpGamingCore/Command', - ['ExpGamingCore.Group@^4.0.0']='./modules/ExpGamingCore/Group', - ['ExpGamingCore.Group@4.0.0']='./modules/ExpGamingCore/Group', ['ExpGamingCore.Server@^4.0.0']='./modules/ExpGamingCore/Server', ['ExpGamingCore.Command@4.0.0']='./modules/ExpGamingCore/Command', ['ExpGamingCommands.home@4.0.0']='./modules/ExpGamingCommands/home', ['ExpGamingCommands.cheatMode@4.0.0']='./modules/ExpGamingCommands/cheatMode', ['ExpGamingCore.Server@4.0.0']='./modules/ExpGamingCore/Server', + ['ExpGamingCore.Group@^4.0.0']='./modules/ExpGamingCore/Group', + ['ExpGamingCore.Group@4.0.0']='./modules/ExpGamingCore/Group', ['ExpGamingCore.Role@^4.0.0']='./modules/ExpGamingCore/Role', ['ExpGamingCore.Role@4.0.0']='./modules/ExpGamingCore/Role', ['ExpGamingCommands.tags@4.0.0']='./modules/ExpGamingCommands/tags',