mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Fixed Server Threads
This commit is contained in:
@@ -74,7 +74,7 @@ Manager.verbose = function(rtn,action)
|
|||||||
else rtn='[FSM] '..tostring(rtn) end
|
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
|
-- 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 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
|
if type(settings.output) == 'function' then
|
||||||
-- calls the output function, not pcalled as if this fails some thing is very wrong
|
-- calls the output function, not pcalled as if this fails some thing is very wrong
|
||||||
settings.output(rtn)
|
settings.output(rtn)
|
||||||
@@ -487,7 +487,7 @@ rawset(Manager.event,'names',setmetatable({},{
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
--over rides for the base values; can be called though Event
|
--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.mod_name = setmetatable({},{__index=_G.module_name})
|
||||||
script.on_event=Manager.event
|
script.on_event=Manager.event
|
||||||
script.raise_event=Manager.event
|
script.raise_event=Manager.event
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Manager.setVerbose{
|
|||||||
moduleLoad=true, -- when a module is required by the manager
|
moduleLoad=true, -- when a module is required by the manager
|
||||||
moduleInit=true, -- when and within the initation of a module
|
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
|
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
|
errorCaught=true, -- when an error is caught during runtime
|
||||||
output=Manager._verbose -- can be: can be: print || log || other function
|
output=Manager._verbose -- can be: can be: print || log || other function
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ Event.register(-2,function(event)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
Server.on_init=function(self)
|
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
|
if pcall(function() return commands._expgaming end) then
|
||||||
commands.add_command('interface', 'Runs the given input from the script', {'code',true}, function(event,args)
|
commands.add_command('interface', 'Runs the given input from the script', {'code',true}, function(event,args)
|
||||||
local callback = args.code
|
local callback = args.code
|
||||||
|
|||||||
Reference in New Issue
Block a user