diff --git a/FactorioSoftmodManager.lua b/FactorioSoftmodManager.lua index 7716deba..28c9c3b0 100644 --- a/FactorioSoftmodManager.lua +++ b/FactorioSoftmodManager.lua @@ -74,7 +74,7 @@ Manager.verbose = function(rtn,action) else rtn='[FSM] '..tostring(rtn) end -- module_verbose is a local override for a file, action is used in the manager to describe an extra type, state is the current state -- if action is true then it will always trigger verbose - if module_verbose or action and (action == true or settings[action]) or (not action and settings[state]) then + if module_verbose or (action and (action == true or settings[action])) or (not action and settings[state]) then if type(settings.output) == 'function' then -- calls the output function, not pcalled as if this fails some thing is very wrong settings.output(rtn) @@ -487,7 +487,7 @@ rawset(Manager.event,'names',setmetatable({},{ })) --over rides for the base values; can be called though Event -Event=setmetatable({},{__index=function(tbl,key) return Manager.event[key] or script[key] or error('Invalid Index To Table Event') end}) +Event=setmetatable({},{__call=Manager.event,__index=function(tbl,key) return Manager.event[key] or script[key] or error('Invalid Index To Table Event') end}) script.mod_name = setmetatable({},{__index=_G.module_name}) script.on_event=Manager.event script.raise_event=Manager.event diff --git a/control.lua b/control.lua index 741705fa..9aba66bc 100644 --- a/control.lua +++ b/control.lua @@ -16,7 +16,7 @@ Manager.setVerbose{ moduleLoad=true, -- when a module is required by the manager moduleInit=true, -- when and within the initation of a module moduleEnv=true, -- during module runtime, this is a global option set within each module for fine control - eventRegistered=false, -- when a module registers its event handlers + eventRegistered=true, -- when a module registers its event handlers errorCaught=true, -- when an error is caught during runtime output=Manager._verbose -- can be: can be: print || log || other function } diff --git a/modules/ExpGamingCore/Server/control.lua b/modules/ExpGamingCore/Server/control.lua index 8cc08963..d8c6347f 100644 --- a/modules/ExpGamingCore/Server/control.lua +++ b/modules/ExpGamingCore/Server/control.lua @@ -380,7 +380,7 @@ Event.register(-2,function(event) end) Server.on_init=function(self) - Event.register(defines.event,Server._thread_handler) + Event.register(defines.events,Server._thread_handler) if pcall(function() return commands._expgaming end) then commands.add_command('interface', 'Runs the given input from the script', {'code',true}, function(event,args) local callback = args.code