Updated for FSM 1.2.5

This commit is contained in:
Cooldude2606
2018-12-15 16:20:01 +00:00
parent 85efbd5cf8
commit 726c212545
29 changed files with 277 additions and 282 deletions

View File

@@ -7,7 +7,7 @@ local moduleIndex = require("/modules/index")
local Manager = {} local Manager = {}
-- this is a constant that is used to represent the server -- this is a constant that is used to represent the server
SERVER = setmetatable({index=0,name='<server>',admin=true,online_time=0,afk_time=0,print=print,__self=true,valid=true},{__index=function(tbl,key) if type(game.players[1][key]) == 'function' then return function() end else return nil end end}) SERVER = setmetatable({index=0,name='<server>',online_time=0,afk_time=0,print=print,admin=true},{__index=function(tbl,key) if type(game.players[1][key]) == 'function' then return function() end else return nil end end})
--- Setup for metatable of the Manager to force read only nature --- Setup for metatable of the Manager to force read only nature
-- @usage Manager() -- runs Manager.loadModdules() -- @usage Manager() -- runs Manager.loadModdules()
@@ -74,9 +74,9 @@ Manager.verbose = function(rtn,action)
local settings = Manager.setVerbose local settings = Manager.setVerbose
local state = Manager.currentState local state = Manager.currentState
if Manager.error and state == Manager.error.__crash then return end if Manager.error and state == Manager.error.__crash then return end
-- if ran in a module the the global module_name is present -- if ran in a module the the global moduleName is present
local rtn = type(rtn) == table and serpent.line(rtn) or tostring(rtn) local rtn = type(rtn) == table and serpent.line(rtn) or tostring(rtn)
if module_name then rtn='['..module_name..'] '..rtn if moduleName then rtn='['..moduleName..'] '..rtn
else rtn='[FSM] '..rtn end else rtn='[FSM] '..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
@@ -178,10 +178,10 @@ Manager.global=setmetatable({__defaults={},__global={
-- creates varible link to global and module information, use of a metatable is for already formed globals -- creates varible link to global and module information, use of a metatable is for already formed globals
local Global = _G.global local Global = _G.global
local metatable = getmetatable(metatable_src) local metatable = getmetatable(metatable_src)
local module_name = type(default) == 'string' and default or metatable and metatable._module_name or module_name local moduleName = type(default) == 'string' and default or metatable and metatable._moduleName or moduleName
local module_path = type(default) == 'string' and moduleIndex[default] or metatable and metatable._module_path or module_path local module_path = type(default) == 'string' and Manager.loadModules.__load[default] or metatable and metatable._module_path or module_path
-- if there is no name or path then it will return and unedited version of global -- if there is no name or path then it will return and unedited version of global
if not module_path or not module_name then return _G.global end if not module_path or not moduleName then return _G.global end
-- edits the link to global to be the corrected dir, path varible is also created -- edits the link to global to be the corrected dir, path varible is also created
local path = 'global' local path = 'global'
for dir in module_path:gmatch('%a+') do for dir in module_path:gmatch('%a+') do
@@ -190,14 +190,14 @@ Manager.global=setmetatable({__defaults={},__global={
Global = rawget(Global,dir) Global = rawget(Global,dir)
end end
-- the default value is set if there was a default given -- the default value is set if there was a default given
if type(default) == 'table' then Manager.verbose('Default global has been set for: global'..string.sub(module_path:gsub('/','.')),2) rawset(rawget(tbl,'__defaults'),tostring(module_name),default) end if type(default) == 'table' then Manager.verbose('Default global has been set for: global'..string.sub(module_path:gsub('/','.')),2) rawset(rawget(tbl,'__defaults'),tostring(moduleName),default) end
-- if the default value is true then it will reset the global to its default -- if the default value is true then it will reset the global to its default
if default == true and rawget(rawget(tbl,'__defaults'),tostring(module_name)) then if default == true and rawget(rawget(tbl,'__defaults'),tostring(moduleName)) then
Manager.verbose('Reset Global Dir to default: '..path) Manager.verbose('Reset Global Dir to default: '..path)
-- cant set it to be equle otherwise it will lose its global propeity -- cant set it to be equle otherwise it will lose its global propeity
local function deepcopy(tbl) if type(tbl) ~= 'table' then return tbl end local rtn = {} for key,value in pairs(tbl) do rtn[key] = deepcopy(value) end return rtn end local function deepcopy(tbl) if type(tbl) ~= 'table' then return tbl end local rtn = {} for key,value in pairs(tbl) do rtn[key] = deepcopy(value) end return rtn end
for key,value in pairs(Global) do rawset(Global,key,nil) end for key,value in pairs(Global) do rawset(Global,key,nil) end
for key,value in pairs(rawget(rawget(tbl,'__defaults'),tostring(module_name))) do rawset(Global,key,deepcopy(value)) end for key,value in pairs(rawget(rawget(tbl,'__defaults'),tostring(moduleName))) do rawset(Global,key,deepcopy(value)) end
end end
-- the metatable is remade if not already present -- the metatable is remade if not already present
metatable = metatable or { metatable = metatable or {
@@ -212,7 +212,7 @@ Manager.global=setmetatable({__defaults={},__global={
end end
return next_pair, tbl, nil return next_pair, tbl, nil
end, end,
_module_path=module_path,_module_name=module_name _module_path=module_path,_moduleName=moduleName
} }
return setmetatable(Global,metatable) return setmetatable(Global,metatable)
end, end,
@@ -286,7 +286,7 @@ Manager.require = setmetatable({
},{ },{
__metatable=false, __metatable=false,
__index=function(tbl,key) return tbl(key,nil,true) end, __index=function(tbl,key) return tbl(key,nil,true) end,
__call=function(tbl,path,env,mute) __call=function(tbl,path,env,mute,noLoad)
local raw_require = rawget(tbl,'__require') local raw_require = rawget(tbl,'__require')
local env = env or {} local env = env or {}
-- runs in a sand box becuase sandbox everything -- runs in a sand box becuase sandbox everything
@@ -295,23 +295,23 @@ Manager.require = setmetatable({
if success then return unpack(data) if success then return unpack(data)
else else
if type(path) ~= 'string' then error('Path supplied must be a string; got: '..type(path),2) return end if type(path) ~= 'string' then error('Path supplied must be a string; got: '..type(path),2) return end
-- else it assums the path was a module name and checks index for the module local override = {}
if moduleIndex[path] then return rawget(Manager.loadModules,path) end local softmod = override
if moduleIndex[path:gsub('?','')] then return rawget(Manager.loadModules,path) end local path = path:find('@') and path:sub(1,path:find('@')-1) or path
-- if its not listed then it tries to remove a version tag and tries again -- tries to load the module from the modeul index
local path_no_version = path:find('@') and path:sub(1,path:find('@')-1) or path if moduleIndex[path] and not noLoad or Manager.loadModules.__load[path] then softmod = Manager.loadModules[path] end
if moduleIndex[path_no_version] then return rawget(Manager.loadModules,path_no_version) end -- will then look for any submodules if there are any; only once every module is loaded
-- still no then it will look for all modules that include this one in the name (like a collection) for moduleName,subpath in pairs(moduleIndex) do
local collection = {} if moduleName:find(path) == 1 and moduleName ~= path then
for module_name,path in pairs(moduleIndex) do local start, _end = moduleName:find(path)
if module_name:find('@') and module_name:sub(1,module_name:find('@')-1) == path_no_version then return rawget(Manager.loadModules,module_name) end local subname = moduleName:sub(_end+2)
if module_name:find(path_no_version) then -- does not add the module if it is a subsubmodule; or the key already exitsts
local start, _end = module_name:find(path_no_version) if not softmod then softmod = {} end
collection[module_name:sub(_end+2)] = rawget(Manager.loadModules,module_name) if not subname:find('.',nil,true) and not softmod[subname] then softmod[subname] = Manager.require(moduleName,nil,true,true) end
end end
end end
-- if there is any keys in the collection the collection is returned else the errors with the require error -- if there is any keys in the softmod it is returned else the errors with the require error
for _ in pairs(collection) do return collection end if override ~= softmod then return softmod end
if mute then return false else error(data,2) end if mute then return false else error(data,2) end
end end
end end
@@ -324,95 +324,134 @@ require = Manager.require
-- @usage #Manager.loadModules -- returns the number of modules loaded -- @usage #Manager.loadModules -- returns the number of modules loaded
-- @usage tostring(Manager.loadModules) -- returns a formatted list of all modules loaded -- @usage tostring(Manager.loadModules) -- returns a formatted list of all modules loaded
-- @usage pairs(Manager.loadModules) -- loops over the loaded modules moduleName, module -- @usage pairs(Manager.loadModules) -- loops over the loaded modules moduleName, module
Manager.loadModules = setmetatable({}, Manager.loadModules = setmetatable({
__load=setmetatable({},{__call=function(self,moduleName)
-- check to provent multiple calls
if self[moduleName] then return end
self[moduleName] = true
self = Manager.loadModules
-- loads the module and its dependices if there are not loaded
local load = moduleIndex[moduleName]
if not load then return end
local path = table.remove(load,1)
Manager.verbose('Loading module: "'..moduleName..'"; path: '..path)
-- loads the parent module
if moduleName:find('.',nil,true) then
local revModuleName = moduleName:reverse()
local start, _end = revModuleName:find('.',nil,true)
local parentName = revModuleName:sub(_end+1):reverse()
Manager.verbose('Loading module parent: "'..parentName..'" for: "'..moduleName..'"; path: '..path)
self.__load(parentName)
end
-- loads the dependices
Manager.verbose('Loading module dependices for: "'..moduleName..'"; path: '..path)
for _,depName in pairs(load) do self.__load(depName) end
self.__load[moduleName] = path
-- runs the module in a sandbox env
local success, module, sandbox = Manager.sandbox(Manager.require.__require,{moduleName=setupModuleName(moduleName),module_path=path},path..'/control')
-- extracts the module into a global index table for later use
if success then
-- verbose to notifie of any globals that were attempted to be created
local globals = ''
for key,value in pairs(sandbox) do globals = globals..key..', ' end
if globals ~= '' then Manager.verbose('Globals caught in "'..moduleName..'": '..globals:sub(1,-3),'errorCaught') end
Manager.verbose('Successfully loaded: "'..moduleName..'"; path: '..path)
-- if it is not a table or nil then it will set up a metatable on it
local currentType = type(rawget(self,moduleName))
if currentType ~= 'nil' and currentType ~= 'table' then
-- if it is a function then it is still able to be called even if more keys are going to be added
-- if it is a string then it will act like one; if it is a number well thats too many metatable indexs
self[moduleName] = setmetatable({__old=self[moduleName]},{
__call=function(self,...) if type(self.__old) == 'function' then self.__old(...) else return self.__old end end,
__tostring=function(self) return self.__old end,
__concat=function(self,val) return self.__old..val end
})
end
-- if you prefere module_exports can be used rather than returning the module
local appendAs = sandbox.module_exports or table.remove(module,1)
if not self[moduleName] then self[moduleName] = appendAs -- if nil it just sets the value
else for key,value in pairs(appendAs) do self[moduleName][key] = value end end -- else it appends the new values
-- if there is a module by this name in _G ex table then it will be indexed to the new module
if rawget(_G,moduleName) and type(rawget(self,moduleName)) == 'table' then setmetatable(rawget(_G,moduleName),{__index=self[moduleName]}) end
if type(rawget(self,moduleName)) == 'table' then self[moduleName]._module_path = path self[moduleName]._moduleName = moduleName end
-- loads the submodule for this softmod
Manager.verbose('Loading submodules for: "'..moduleName..'"; path: '..path)
for subModName,_ in pairs(moduleIndex) do
if subModName:find(moduleName) == 1 and subModName ~= moduleName then self.__load(subModName) end
end
else
Manager.verbose('Failed load: "'..moduleName..'"; path: '..path..' ('..module..')','errorCaught')
for event_name,callbacks in pairs(Manager.event) do Manager.verbose('Removed Event Handler: "'..moduleName..'/'..Manager.event.names[event_name],'eventRegistered') callbacks[moduleName] = nil end
end
end}),
__init=setmetatable({},{__call=function(self,moduleName)
-- check to provent multiple calls
if self[moduleName] or not Manager.loadModules.__load[moduleName] then return end
self[moduleName] = true
self = Manager.loadModules
-- calls on_init for each module
-- looks for init so that init or on_init can be used
local data = self[moduleName]
if type(data) == 'table' and data.init and data.on_init == nil then data.on_init = data.init data.init = nil end
if type(data) == 'table' and data.on_init and type(data.on_init) == 'function' then
Manager.verbose('Initiating module: "'..moduleName..'"')
local success, err = Manager.sandbox(data.on_init,{moduleName=setupModuleName(moduleName),module_path=Manager.loadModules.__load[tostring(moduleName)]},data)
if success then
Manager.verbose('Successfully Initiated: "'..moduleName..'"')
else
Manager.verbose('Failed Initiation: "'..moduleName..'" ('..err..')','errorCaught')
end
-- clears the init function so it cant be used in runtime
data.on_init = nil
end
end}),
__post=setmetatable({},{__call=function(self,moduleName)
-- check to provent multiple calls
if self[moduleName] or not Manager.loadModules.__init[moduleName] then return end
self[moduleName] = true
self = Manager.loadModules
-- calls on_post for each module
-- looks for post so that post or on_post can be used
local data = self[moduleName]
if type(data) == 'table' and data.post and data.on_post == nil then data.on_post = data.post data.post = nil end
if type(data) == 'table' and data.on_post and type(data.on_post) == 'function' then
Manager.verbose('Post for module: "'..moduleName..'"')
local success, err = Manager.sandbox(data.on_post,{moduleName=setupModuleName(moduleName),module_path=Manager.loadModules.__load[tostring(moduleName)]},data)
if success then
Manager.verbose('Successful post: "'..moduleName..'"')
else
Manager.verbose('Failed post: "'..moduleName..'" ('..err..')','errorCaught')
end
-- clears the post function so it cant be used in runtime
data.on_post = nil
end
end})
},
{ {
__metatable=false, __metatable=false,
__index=Manager.require, __index=function(self,moduleName)
__call=function(tbl) -- will load one module if it is not already loaded, will not init during load state or post
-- ReadOnlyManager used to trigger verbose change self.__load(moduleName)
if (ReadOnlyManager.currentState == 'moduleLoad') then return end
self.__init(moduleName)
if (ReadOnlyManager.currentState == 'moduleInit') then return end
self.__post(moduleName)
return rawget(self,moduleName)
end,
__call=function(self)
-- goes though the index looking for modules to load
ReadOnlyManager.currentState = 'moduleLoad' ReadOnlyManager.currentState = 'moduleLoad'
-- goes though the index looking for modules for moduleName,path in pairs(moduleIndex) do self.__load(moduleName) end
for module_name,path in pairs(moduleIndex) do
Manager.verbose('Loading module: "'..module_name..'"; path: '..path)
-- runs the module in a sandbox env
local success, module, sandbox = Manager.sandbox(Manager.require.__require,{module_name=setupModuleName(module_name),module_path=path},path..'/control')
-- extracts the module into a global index table for later use
if success then
-- verbose to notifie of any globals that were attempted to be created
local globals = ''
for key,value in pairs(sandbox) do globals = globals..key..', ' end
if globals ~= '' then Manager.verbose('Globals caught in "'..module_name..'": '..globals:sub(1,-3),'errorCaught') end
Manager.verbose('Successfully loaded: "'..module_name..'"; path: '..path)
-- sets that it has been loaded and adds to the loaded index
-- if you prefere module_exports can be used rather than returning the module
if type(tbl[module_name]) == 'nil' then
-- if it is a new module then creat the new index
if sandbox.module_exports and type(sandbox.module_exports) == 'table'
then tbl[module_name] = sandbox.module_exports
else tbl[module_name] = table.remove(module,1) end
elseif type(tbl[module_name]) == 'table' then
-- if this module adds onto an existing one then append the keys
if sandbox.module_exports and type(sandbox.module_exports) == 'table'
then for key,value in pairs(sandbox.module_exports) do tbl[module_name][key] = value end
else for key,value in pairs(table.remove(module,1)) do tbl[module_name][key] = value end end
else
-- if it is a function then it is still able to be called even if more keys are going to be added
-- if it is a string then it will act like one; if it is a number well thats too many metatable indexs
tbl[module_name] = setmetatable({__old=tbl[module_name]},{
__call=function(tbl,...) if type(tbl.__old) == 'function' then tbl.__old(...) else return tbl.__old end end,
__tostring=function(tbl) return tbl.__old end,
__concat=function(tbl,val) return tbl.__old..val end
})
-- same as above for adding the keys to the table
if sandbox.module_exports and type(sandbox.module_exports) == 'table'
then for key,value in pairs(sandbox.module_exports) do tbl[module_name][key] = value end
else for key,value in pairs(table.remove(module,1)) do tbl[module_name][key] = value end end
end
-- if there is a module by this name in _G ex table then it will be indexed to the new module
if rawget(_G,module_name) and type(tbl[module_name]) == 'table' then setmetatable(rawget(_G,module_name),{__index=tbl[module_name]}) end
if type(tbl[module_name]) == 'table' then tbl[module_name]._module_path = path tbl[module_name]._module_name = module_name end
else
Manager.verbose('Failed load: "'..module_name..'"; path: '..path..' ('..module..')','errorCaught')
for event_name,callbacks in pairs(Manager.event) do Manager.verbose('Removed Event Handler: "'..module_name..'/'..Manager.event.names[event_name],'eventRegistered') callbacks[module_name] = nil end
end
end
-- new state for the manager to allow control of verbose
ReadOnlyManager.currentState = 'moduleInit'
-- runs though all loaded modules looking for on_init function; all other modules have been loaded use this to load extra code based on opttial dependies -- runs though all loaded modules looking for on_init function; all other modules have been loaded use this to load extra code based on opttial dependies
for module_name,data in pairs(tbl) do ReadOnlyManager.currentState = 'moduleInit'
-- looks for init so that init or on_init can be used for moduleName,path in pairs(self) do
if type(data) == 'table' and data.init and data.on_init == nil then data.on_init = data.init data.init = nil end if moduleName ~= '__load' and moduleName ~= '__init' and moduleName ~= '__post' then self.__init(moduleName) end
if type(data) == 'table' and data.on_init and type(data.on_init) == 'function' then
Manager.verbose('Initiating module: "'..module_name..'"')
local success, err = Manager.sandbox(data.on_init,{module_name=setupModuleName(module_name),module_path=moduleIndex[tostring(module_name)]},data)
if success then
Manager.verbose('Successfully Initiated: "'..module_name..'"')
else
Manager.verbose('Failed Initiation: "'..module_name..'" ('..err..')','errorCaught')
end
-- clears the init function so it cant be used in runtime
data.on_init = nil
end
end end
-- new state for the manager to allow control of verbose
ReadOnlyManager.currentState = 'modulePost'
-- runs though all loaded modules looking for on_post function; all other modules have been loaded and inited, do not load extra code in this time only altar your own data -- runs though all loaded modules looking for on_post function; all other modules have been loaded and inited, do not load extra code in this time only altar your own data
for module_name,data in pairs(tbl) do ReadOnlyManager.currentState = 'modulePost'
-- looks for post so that post or on_post can be used for moduleName,path in pairs(self) do
if type(data) == 'table' and data.post and data.on_post == nil then data.on_post = data.post data.post = nil end if moduleName ~= '__load' and moduleName ~= '__init' and moduleName ~= '__post' then self.__post(moduleName) end
if type(data) == 'table' and data.on_post and type(data.on_post) == 'function' then
Manager.verbose('Post for module: "'..module_name..'"')
local success, err = Manager.sandbox(data.on_post,{module_name=setupModuleName(module_name),module_path=moduleIndex[tostring(module_name)]},data)
if success then
Manager.verbose('Successful post: "'..module_name..'"')
else
Manager.verbose('Failed post: "'..module_name..'" ('..err..')','errorCaught')
end
-- clears the post function so it cant be used in runtime
data.on_post = nil
end
end end
-- this could also be called runtime
ReadOnlyManager.currentState = 'moduleEnv' ReadOnlyManager.currentState = 'moduleEnv'
end, end,
__len=function(tbl) __len=function(tbl)
@@ -421,13 +460,13 @@ Manager.loadModules = setmetatable({},
for key,value in pairs(tbl) do for key,value in pairs(tbl) do
rtn = rtn + 1 rtn = rtn + 1
end end
return rtn return rtn-3
end, end,
__tostring=function(tbl) __tostring=function(tbl)
-- a concat of all the loaded modules -- a concat of all the loaded modules
local rtn = 'Load Modules: ' local rtn = 'Load Modules: '
for key,value in pairs(tbl) do for key,value in pairs(tbl) do
rtn=rtn..key..', ' if key ~= '__load' and key ~= '__init' and key ~= '__post' then rtn=rtn..key..', ' end
end end
return rtn:sub(1,-3) return rtn:sub(1,-3)
end end
@@ -575,13 +614,13 @@ Manager.event = setmetatable({
-- other wise raise the event and call every callback; no use of script.raise_event due to override -- other wise raise the event and call every callback; no use of script.raise_event due to override
local event_functions = tbl.__events[event_name] local event_functions = tbl.__events[event_name]
if type(event_functions) == 'table' then if type(event_functions) == 'table' then
for module_name,callback in pairs(event_functions) do for moduleName,callback in pairs(event_functions) do
-- loops over the call backs and which module it is from -- loops over the call backs and which module it is from
if type(callback) ~= 'function' then error('Invalid Event Callback: "'..event_name..'/'..module_name..'"') end if type(callback) ~= 'function' then error('Invalid Event Callback: "'..event_name..'/'..moduleName..'"') end
local success, err = Manager.sandbox(callback,{module_name=setupModuleName(module_name),module_path=moduleIndex[tostring(module_name)]},new_callback,...) local success, err = Manager.sandbox(callback,{moduleName=setupModuleName(moduleName),module_path=Manager.loadModules.__load[tostring(moduleName)]},new_callback,...)
if not success then if not success then
local chache = tbl.error_chache local chache = tbl.error_chache
local error_message = 'Event Failed: "'..module_name..'/'..tbl.names[event_name]..'" ('..err..')' local error_message = 'Event Failed: "'..moduleName..'/'..tbl.names[event_name]..'" ('..err..')'
if not chache[error_message] then Manager.verbose(error_message,'errorCaught') error(error_message) end if not chache[error_message] then Manager.verbose(error_message,'errorCaught') error(error_message) end
if tbl.names[event_name] == 'on_tick' then if tbl.names[event_name] == 'on_tick' then
if not chache[error_message] then chache[error_message] = {game.tick,1} end if not chache[error_message] then chache[error_message] = {game.tick,1} end
@@ -589,12 +628,12 @@ Manager.event = setmetatable({
else chache[error_message] = nil end else chache[error_message] = nil end
if chache[error_message] and chache[error_message][2] > 100 then if chache[error_message] and chache[error_message][2] > 100 then
Manager.verbose('There was an error happening every tick for 100 ticks, the event handler has been removed!','errorCaught') Manager.verbose('There was an error happening every tick for 100 ticks, the event handler has been removed!','errorCaught')
event_functions[module_name] = nil event_functions[moduleName] = nil
end end
end end
end end
-- if stop constant is returned then stop further processing -- if stop constant is returned then stop further processing
if err == rawget(tbl,'__stop') then Manager.verbose('Event Haulted By: "'..module_name..'"','errorCaught') break end if err == rawget(tbl,'__stop') then Manager.verbose('Event Haulted By: "'..moduleName..'"','errorCaught') break end
end end
end end
end, end,
@@ -602,7 +641,7 @@ Manager.event = setmetatable({
-- handles the creation of new event handlers -- handles the creation of new event handlers
if type(value) ~= 'function' and type(value) ~= nil then error('Attempted to set a non function value to an event',2) end if type(value) ~= 'function' and type(value) ~= nil then error('Attempted to set a non function value to an event',2) end
-- checks for a global module name that is present -- checks for a global module name that is present
local module_name = module_name or 'FSM' local moduleName = moduleName or 'FSM'
-- converts the key to a number index for the event -- converts the key to a number index for the event
Manager.verbose('Added Handler: "'..tbl.names[key]..'"','eventRegistered') Manager.verbose('Added Handler: "'..tbl.names[key]..'"','eventRegistered')
-- checks that the event has a valid table to store callbacks; if its not valid it will creat it and register a real event handler -- checks that the event has a valid table to store callbacks; if its not valid it will creat it and register a real event handler
@@ -611,18 +650,18 @@ Manager.event = setmetatable({
elseif key < 0 then rawget(tbl,tbl.names[key])(function(...) tbl(key,...) end) elseif key < 0 then rawget(tbl,tbl.names[key])(function(...) tbl(key,...) end)
else rawget(tbl,'__event')(key,function(...) tbl(key,...) end) end else rawget(tbl,'__event')(key,function(...) tbl(key,...) end) end
rawset(rawget(tbl,'__events'),key,{}) end rawset(rawget(tbl,'__events'),key,{}) end
-- adds callback to Manager.event.__events[event_id][module_name] -- adds callback to Manager.event.__events[event_id][moduleName]
rawset(rawget(rawget(tbl,'__events'),key),tostring(module_name),value) rawset(rawget(rawget(tbl,'__events'),key),tostring(moduleName),value)
end, end,
__index=function(tbl,key) __index=function(tbl,key)
-- few redirect key -- few redirect key
local redirect={register=tbl,dispatch=tbl,remove=function(event_id) tbl[event_name]=nil end} local redirect={register=tbl,dispatch=tbl,remove=function(event_id) tbl[event_name]=nil end}
if rawget(redirect,key) then return rawget(redirect,key) end if rawget(redirect,key) then return rawget(redirect,key) end
-- proforms different look ups depentding weather the current module has an event handler registered -- proforms different look ups depentding weather the current module has an event handler registered
if module_name then if moduleName then
-- first looks for the event callback table and then under the module name; does same but converts the key to a number; no handler regisered so returns the converted event id -- first looks for the event callback table and then under the module name; does same but converts the key to a number; no handler regisered so returns the converted event id
return rawget(rawget(tbl,'__events'),key) and rawget(rawget(rawget(tbl,'__events'),key),tostring(module_name)) return rawget(rawget(tbl,'__events'),key) and rawget(rawget(rawget(tbl,'__events'),key),tostring(moduleName))
or rawget(rawget(tbl,'__events'),rawget(tbl,'names')[key]) and rawget(rawget(rawget(tbl,'__events'),rawget(tbl,'names')[key]),tostring(module_name)) or rawget(rawget(tbl,'__events'),rawget(tbl,'names')[key]) and rawget(rawget(rawget(tbl,'__events'),rawget(tbl,'names')[key]),tostring(moduleName))
or rawget(tbl,'names')[key] or rawget(tbl,'names')[key]
else else
-- if there is no module present then it will return the full list of regisered handlers; or other wise the converted event id -- if there is no module present then it will return the full list of regisered handlers; or other wise the converted event id
@@ -702,7 +741,7 @@ script.on_load(function(...)
end) end)
--over rides for the base values; can be called though Event --over rides for the base values; can be called though Event
Event=setmetatable({},{__call=Manager.event,__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.moduleName})
script.on_event=Manager.event script.on_event=Manager.event
script.raise_event=Manager.event script.raise_event=Manager.event
script.on_init=function(callback) Manager.event(-1,callback) end script.on_init=function(callback) Manager.event(-1,callback) end

View File

@@ -6,7 +6,7 @@ Manager.setVerbose{
moduleLoad=false, -- when a module is required by the manager moduleLoad=false, -- when a module is required by the manager
moduleInit=false, -- when and within the initation of a module moduleInit=false, -- when and within the initation of a module
modulePost=false, -- when and within the post of a module modulePost=false, -- when and within the post of a module
moduleEnv=true, -- during module runtime, this is a global option set within each module for fine control moduleEnv=false, -- 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=false, -- 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

View File

@@ -19,8 +19,8 @@
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingLib": "^4.0.0", "ExpGamingLib": "^4.0.0",
"ExpGamingAdmin.Warnings": "?^4.0.0", "ExpGamingAdmin.Warnings": "?^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"ExpGamingAdmin.AdminLib": "^4.0.0" "ExpGamingAdmin.AdminLib": "?^4.0.0"
}, },
"submodules": {} "submodules": {}
} }

View File

@@ -10,10 +10,10 @@
], ],
"dependencies": { "dependencies": {
"FactorioStdLib": "^0.8.0", "FactorioStdLib": "^0.8.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"ExpGamingCore.Sync": "^4.0.0", "ExpGamingCore.Sync": "?^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Server": "^4.0.0" "ExpGamingCore.Server": "?^4.0.0"
}, },
"collection": "ExpGamingAdmin@4.0.0", "collection": "ExpGamingAdmin@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -14,8 +14,8 @@
"ExpGamingAdmin.Gui": "^4.0.0", "ExpGamingAdmin.Gui": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "^0.8.0", "FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "^4.0.0", "ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0" "ExpGamingAdmin.ClearInventory": "?^4.0.0"
}, },
"collection": "ExpGamingAdmin@4.0.0", "collection": "ExpGamingAdmin@4.0.0",

View File

@@ -15,7 +15,7 @@
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingPlayer": "?^4.0.0", "ExpGamingPlayer": "?^4.0.0",
"ExpGamingPlayer.playerInfo": "^4.0.0", "ExpGamingPlayer.playerInfo": "?^4.0.0",
"mod-gui": "*" "mod-gui": "*"
}, },
"collection": "ExpGamingAdmin@4.0.0", "collection": "ExpGamingAdmin@4.0.0",

View File

@@ -15,8 +15,8 @@
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "^0.8.0", "FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "^4.0.0", "ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0" "ExpGamingAdmin.ClearInventory": "?^4.0.0"
}, },
"collection": "ExpGamingAdmin@4.0.0", "collection": "ExpGamingAdmin@4.0.0",

View File

@@ -14,8 +14,8 @@
"ExpGamingAdmin.Gui": "^4.0.0", "ExpGamingAdmin.Gui": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "^0.8.0", "FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "^4.0.0", "ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0" "ExpGamingAdmin.ClearInventory": "?^4.0.0"
}, },
"collection": "ExpGamingAdmin@4.0.0", "collection": "ExpGamingAdmin@4.0.0",

View File

@@ -16,8 +16,8 @@
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "^0.8.0", "FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "^4.0.0", "ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingCore.Gui": "^4.0.0" "ExpGamingCore.Gui": "^4.0.0"
}, },
"collection": "ExpGamingAdmin@4.0.0", "collection": "ExpGamingAdmin@4.0.0",

View File

@@ -15,8 +15,8 @@
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "^0.8.0", "FactorioStdLib.Color": "?^0.8.0",
"ExpGamingCore.Sync": "^4.0.0", "ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingAdmin.ClearInventory": "?^4.0.0" "ExpGamingAdmin.ClearInventory": "?^4.0.0"
}, },
"collection": "ExpGamingAdmin@4.0.0", "collection": "ExpGamingAdmin@4.0.0",

View File

@@ -17,9 +17,9 @@
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Color": "^0.8.0", "FactorioStdLib.Color": "?^0.8.0",
"ExpGamingAdmin.Reports": "^4.0.0", "ExpGamingAdmin.Reports": "?^4.0.0",
"ExpGamingCore.Sync": "^4.0.0" "ExpGamingCore.Sync": "?^4.0.0"
}, },
"collection": "ExpGamingAdmin@4.0.0", "collection": "ExpGamingAdmin@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -12,7 +12,7 @@
"dependencies": { "dependencies": {
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0" "ExpGamingCore.Role": "?^4.0.0"
}, },
"collection": "ExpGamingBot@4.0.0", "collection": "ExpGamingBot@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -12,8 +12,8 @@
"dependencies": { "dependencies": {
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"ExpGamingCore.Sync": "^4.0.0" "ExpGamingCore.Sync": "?^4.0.0"
}, },
"collection": "ExpGamingBot@4.0.0", "collection": "ExpGamingBot@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -14,7 +14,7 @@
"dependencies": { "dependencies": {
"ExpGamingCore.Command": "^4.0.0", "ExpGamingCore.Command": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "^4.0.0",
"FactorioStdLib.Game": "^4.0.0" "FactorioStdLib.Game": "^0.8.0"
}, },
"collection": "ExpGamingCommands@4.0.0", "collection": "ExpGamingCommands@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -15,7 +15,7 @@
"ExpGamingLib": "^4.0.0", "ExpGamingLib": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "^4.0.0",
"ExpGamingAdmin.TempBan": "^4.0.0" "ExpGamingAdmin.TempBan": "?^4.0.0"
}, },
"collection": "ExpGamingCommands@4.0.0", "collection": "ExpGamingCommands@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -11,7 +11,7 @@
], ],
"dependencies": { "dependencies": {
"ExpGamingLib": "^4.0.0", "ExpGamingLib": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"ExpGamingCore.Command": "^4.0.0", "ExpGamingCore.Command": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0" "FactorioStdLib.Game": "^0.8.0"
}, },

View File

@@ -13,7 +13,7 @@
], ],
"dependencies": { "dependencies": {
"FactorioStdLib": "^0.8.0", "FactorioStdLib": "^0.8.0",
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "?^4.0.0",
"ExpGamingLib": "^4.0.0", "ExpGamingLib": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0" "FactorioStdLib.Game": "^0.8.0"
}, },

View File

@@ -101,14 +101,14 @@ function popup.open(style,data,players)
end end
end end
function popup._prototype:add_left(obj)
if not Gui.left then return end
obj.name = obj.name or self.name
self.left = Gui.left(obj)
end
function popup:on_init() function popup:on_init()
if loaded_modules['ExpGamingCore.Server'] then Server = require('ExpGamingCore.Server') end if loaded_modules['ExpGamingCore.Server'] then Server = require('ExpGamingCore.Server') end
if loaded_modules['ExpGamingCore.Gui.left'] then
function popup._prototype:add_left(obj)
obj.name = obj.name or self.name
self.left = Gui.left(obj)
end
end
end end
function popup:on_post() function popup:on_post()

View File

@@ -15,9 +15,9 @@
"FactorioStdLib.Table": "^0.8.0", "FactorioStdLib.Table": "^0.8.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Group": "^4.0.0", "ExpGamingCore.Group": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "?^4.0.0",
"ExpGamingCore.Command": "^4.0.0", "ExpGamingCore.Command": "?^4.0.0",
"ExpGamingCore.Sync": "^4.0.0" "ExpGamingCore.Sync": "?^4.0.0"
}, },
"collection": "ExpGamingCore@4.0.0", "collection": "ExpGamingCore@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -19,8 +19,8 @@
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.Table": "^0.8.0", "FactorioStdLib.Table": "^0.8.0",
"ExpGamingCore.Role": "?^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"ExpGamingCore.Gui": "^4.0.0", "ExpGamingCore.Gui": "?^4.0.0",
"ExpGamingCore.Server": "^4.0.0" "ExpGamingCore.Server": "?^4.0.0"
}, },
"collection": "ExpGamingCore@4.0.0", "collection": "ExpGamingCore@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -16,7 +16,7 @@
"dependencies": { "dependencies": {
"ExpGamingCore.Gui": "^4.0.0", "ExpGamingCore.Gui": "^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Sync": "^4.0.0" "ExpGamingCore.Sync": "?^4.0.0"
}, },
"submodules": {}, "submodules": {},
"collection": "ExpGamingInfo@4.0.0" "collection": "ExpGamingInfo@4.0.0"

View File

@@ -13,9 +13,9 @@
"dependencies": { "dependencies": {
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Gui": "^4.0.0", "ExpGamingCore.Gui": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"ExpGamingCore.Sync": "^4.0.0", "ExpGamingCore.Sync": "?^4.0.0",
"ExpGamingCore.Server": "^4.0.0" "ExpGamingCore.Server": "?^4.0.0"
}, },
"collection": "ExpGamingPlayer@4.0.0", "collection": "ExpGamingPlayer@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -13,7 +13,7 @@
"ExpGamingLib": "^4.0.0", "ExpGamingLib": "^4.0.0",
"ExpGamingAdmin.TempBan": "^4.0.0", "ExpGamingAdmin.TempBan": "^4.0.0",
"ExpGamingAdmin.Warnings": "^4.0.0", "ExpGamingAdmin.Warnings": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingAdmin.AdminLib": "^4.0.0" "ExpGamingAdmin.AdminLib": "^4.0.0"
}, },

View File

@@ -13,8 +13,8 @@
"dependencies": { "dependencies": {
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Gui": "^4.0.0", "ExpGamingCore.Gui": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"ExpGamingCore.Group": "^4.0.0" "ExpGamingCore.Group": "?^4.0.0"
}, },
"collection": "ExpGamingPlayer@4.0.0", "collection": "ExpGamingPlayer@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -12,12 +12,12 @@
"dependencies": { "dependencies": {
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Gui": "^4.0.0", "ExpGamingCore.Gui": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"ExpGamingAdmin.AdminLib": "^4.0.0", "ExpGamingAdmin.AdminLib": "?^4.0.0",
"ExpGamingAdmin.buttonFlow": "?^4.0.0", "ExpGamingAdmin.buttonFlow": "?^4.0.0",
"ExpGamingAdmin.reports": "?^4.0.0", "ExpGamingAdmin.reports": "?^4.0.0",
"ExpGamingPlayer.playerInfo": "?^4.0.0", "ExpGamingPlayer.playerInfo": "?^4.0.0",
"ExpGamingAdmin.Gui": "^4.0.0" "ExpGamingAdmin.Gui": "?^4.0.0"
}, },
"collection": "ExpGamingPlayer@4.0.0", "collection": "ExpGamingPlayer@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -12,7 +12,7 @@
"dependencies": { "dependencies": {
"ExpGamingCore.Gui": "^4.0.0", "ExpGamingCore.Gui": "^4.0.0",
"ExpGamingCore.Server": "^4.0.0", "ExpGamingCore.Server": "^4.0.0",
"ExpGamingCore.Role": "^4.0.0" "ExpGamingCore.Role": "?^4.0.0"
}, },
"collection": "ExpGamingPlayer@4.0.0", "collection": "ExpGamingPlayer@4.0.0",
"submodules": {} "submodules": {}

View File

@@ -14,8 +14,8 @@
"license": "https://github.com/explosivegaming/scenario/blob/master/LICENSE", "license": "https://github.com/explosivegaming/scenario/blob/master/LICENSE",
"dependencies": { "dependencies": {
"FactorioStdLib.Game": "^0.8.0", "FactorioStdLib.Game": "^0.8.0",
"ExpGamingCore.Role": "^4.0.0", "ExpGamingCore.Role": "?^4.0.0",
"ExpGamingCore.Command": "^4.0.0", "ExpGamingCore.Command": "?^4.0.0",
"ExpGamingCore.Gui": "^4.0.0" "ExpGamingCore.Gui": "^4.0.0"
}, },
"submodules": {} "submodules": {}

View File

@@ -1,80 +1,68 @@
-- not_luadoc=true -- not_luadoc=true
--- Used to index the files to be loaded --- Used to index the files to be loaded
return { return {
['FactorioStdLib.String']='./modules/FactorioStdLib/String', ['AdvancedStartingItems']={'./modules/AdvancedStartingItems',},
['FactorioStdLib.String']='./modules/FactorioStdLib/String', ['ChatPopup']={'./modules/ChatPopup','FactorioStdLib.Game','FactorioStdLib.Color'},
['FactorioStdLib.Table']='./modules/FactorioStdLib/Table', ['DamagePopup']={'./modules/DamagePopup','FactorioStdLib.Color'},
['FactorioStdLib.Table']='./modules/FactorioStdLib/Table', ['DeathMarkers']={'./modules/DeathMarkers',},
['FactorioStdLib.Game']='./modules/FactorioStdLib/Game', ['DeconControl']={'./modules/DeconControl','ExpGamingCore.Server','FactorioStdLib.Game','ExpGamingLib'},
['DeathMarkers']='./modules/DeathMarkers', ['ExpGamingAdmin']={'./modules/ExpGamingAdmin',},
['FactorioStdLib.Color']='./modules/FactorioStdLib/Color', ['ExpGamingBot']={'./modules/ExpGamingBot',},
['FactorioStdLib.Color']='./modules/FactorioStdLib/Color', ['ExpGamingCommands']={'./modules/ExpGamingCommands',},
['PlayerAutoColor']='./modules/PlayerAutoColor', ['ExpGamingCore']={'./modules/ExpGamingCore',},
['DamagePopup']='./modules/DamagePopup', ['ExpGamingInfo']={'./modules/ExpGamingInfo',},
['FactorioStdLib.Game']='./modules/FactorioStdLib/Game', ['ExpGamingLib']={'./modules/ExpGamingLib','FactorioStdLib.Game','FactorioStdLib.Color','FactorioStdLib.Table'},
['WornPaths']='./modules/WornPaths', ['ExpGamingPlayer']={'./modules/ExpGamingPlayer',},
['SpawnArea']='./modules/SpawnArea', ['FactorioStdLib']={'./modules/FactorioStdLib',},
['FactorioStdLib']='./modules/FactorioStdLib', ['GameSettingsGui']={'./modules/GameSettingsGui','ExpGamingCore.Server','ExpGamingCore.Gui'},
['FactorioStdLib']='./modules/FactorioStdLib', ['GuiAnnouncements']={'./modules/GuiAnnouncements','FactorioStdLib.Game','ExpGamingCore.Role','ExpGamingCore.Gui'},
['ExpGamingLib']='./modules/ExpGamingLib', ['PlayerAutoColor']={'./modules/PlayerAutoColor','FactorioStdLib.Color'},
['ExpGamingLib']='./modules/ExpGamingLib', ['SpawnArea']={'./modules/SpawnArea','FactorioStdLib.Game'},
['ExpGamingCore.Command']='./modules/ExpGamingCore/Command', ['WarpPoints']={'./modules/WarpPoints','FactorioStdLib.Game','ExpGamingCore.Gui'},
['ExpGamingCore.Server']='./modules/ExpGamingCore/Server', ['WornPaths']={'./modules/WornPaths','FactorioStdLib.Game'},
['ExpGamingCore.Command']='./modules/ExpGamingCore/Command', ['ExpGamingAdmin.ClearInventory']={'./modules/ExpGamingAdmin/ClearInventory','ExpGamingAdmin.AdminLib','FactorioStdLib.Game'},
['ExpGamingCommands.home']='./modules/ExpGamingCommands/home', ['ExpGamingAdmin.Jail']={'./modules/ExpGamingAdmin/Jail','ExpGamingAdmin.AdminLib','ExpGamingAdmin.Gui','ExpGamingCore.Server','ExpGamingCore.Role','FactorioStdLib.Game'},
['ExpGamingCommands.cheatMode']='./modules/ExpGamingCommands/cheatMode', ['ExpGamingAdmin.AdminLib']={'./modules/ExpGamingAdmin/AdminLib','FactorioStdLib','FactorioStdLib.Game'},
['ExpGamingCore.Server']='./modules/ExpGamingCore/Server', ['ExpGamingAdmin.Gui']={'./modules/ExpGamingAdmin/Gui','ExpGamingAdmin.AdminLib','ExpGamingCore.Gui','ExpGamingCore.Role','FactorioStdLib.Game','mod-gui'},
['ExpGamingCore.Group']='./modules/ExpGamingCore/Group', ['ExpGamingAdmin.Ban']={'./modules/ExpGamingAdmin/Ban','ExpGamingAdmin.AdminLib','ExpGamingAdmin.Gui','ExpGamingCore.Server','FactorioStdLib.Game'},
['ExpGamingCore.Group']='./modules/ExpGamingCore/Group', ['ExpGamingAdmin.Teleport']={'./modules/ExpGamingAdmin/Teleport','ExpGamingAdmin.AdminLib','ExpGamingAdmin.Gui','FactorioStdLib.Game'},
['ExpGamingCore.Role']='./modules/ExpGamingCore/Role', ['ExpGamingAdmin.Warnings']={'./modules/ExpGamingAdmin/Warnings','ExpGamingAdmin.AdminLib','ExpGamingCore.Server','ExpGamingCore.Role','FactorioStdLib.Game'},
['ExpGamingCore.Role']='./modules/ExpGamingCore/Role', ['ExpGamingAdmin.Kick']={'./modules/ExpGamingAdmin/Kick','ExpGamingAdmin.AdminLib','ExpGamingAdmin.Gui','ExpGamingCore.Server','FactorioStdLib.Game'},
['ExpGamingCommands.tags']='./modules/ExpGamingCommands/tags', ['ExpGamingAdmin.Commands']={'./modules/ExpGamingAdmin/Commands','ExpGamingLib','ExpGamingCore.Command','ExpGamingAdmin.AdminLib'},
['ExpGamingCommands.kill']='./modules/ExpGamingCommands/kill', ['ExpGamingAdmin.TempBan']={'./modules/ExpGamingAdmin/TempBan','ExpGamingAdmin.AdminLib','ExpGamingCore.Server','ExpGamingCore.Role','FactorioStdLib.Game'},
['ExpGamingCommands.bonus']='./modules/ExpGamingCommands/bonus', ['ExpGamingAdmin.Reports']={'./modules/ExpGamingAdmin/Reports','ExpGamingAdmin.AdminLib','ExpGamingCore.Server','ExpGamingCore.Role','FactorioStdLib.Game','ExpGamingCore.Gui'},
['ExpGamingBot.autoChat']='./modules/ExpGamingBot/autoChat', ['ExpGamingBot.autoChat']={'./modules/ExpGamingBot/autoChat','FactorioStdLib.Game','ExpGamingCore.Server'},
['ExpGamingCore.Gui']='./modules/ExpGamingCore/Gui', ['ExpGamingBot.autoMessage']={'./modules/ExpGamingBot/autoMessage','ExpGamingCore.Server','FactorioStdLib.Game'},
['ExpGamingCore.Gui']='./modules/ExpGamingCore/Gui', ['ExpGamingBot.discordAlerts']={'./modules/ExpGamingBot/discordAlerts','ExpGamingCore.Sync','FactorioStdLib.Color','FactorioStdLib.Game'},
['WarpPoints']='./modules/WarpPoints', ['ExpGamingCommands.cheatMode']={'./modules/ExpGamingCommands/cheatMode','ExpGamingCore.Command'},
['GuiAnnouncements']='./modules/GuiAnnouncements', ['ExpGamingCommands.home']={'./modules/ExpGamingCommands/home','FactorioStdLib.Game','ExpGamingCore.Command'},
['GameSettingsGui']='./modules/GameSettingsGui', ['ExpGamingCommands.teleport']={'./modules/ExpGamingCommands/teleport','ExpGamingCore.Command','ExpGamingAdmin.Teleport','ExpGamingAdmin.AdminLib'},
['ExpGamingInfo.Tasklist']='./modules/ExpGamingInfo/Tasklist', ['ExpGamingCore.Server']={'./modules/ExpGamingCore/Server','ExpGamingLib','FactorioStdLib.Table','FactorioStdLib.Color','FactorioStdLib.String','FactorioStdLib.Game'},
['ExpGamingCore.Sync']='./modules/ExpGamingCore/Sync', ['ExpGamingCommands.bonus']={'./modules/ExpGamingCommands/bonus','FactorioStdLib.Game','ExpGamingLib','ExpGamingCore.Command','ExpGamingCore.Role'},
['ExpGamingPlayer.polls']='./modules/ExpGamingPlayer/polls', ['ExpGamingCommands.repair']={'./modules/ExpGamingCommands/repair','ExpGamingLib','FactorioStdLib.Game','ExpGamingCore.Role'},
['ExpGamingPlayer.playerInfo']='./modules/ExpGamingPlayer/playerInfo', ['ExpGamingCommands.kill']={'./modules/ExpGamingCommands/kill','ExpGamingCore.Command','ExpGamingCore.Role','FactorioStdLib.Game'},
['ExpGamingPlayer.afkKick']='./modules/ExpGamingPlayer/afkKick', ['ExpGamingCommands.tags']={'./modules/ExpGamingCommands/tags','ExpGamingLib','ExpGamingCore.Command','FactorioStdLib.Game'},
['ExpGamingCore.Sync']='./modules/ExpGamingCore/Sync', ['ExpGamingCore.Gui']={'./modules/ExpGamingCore/Gui','ExpGamingLib','FactorioStdLib.Table','FactorioStdLib.Color','FactorioStdLib.Game'},
['ExpGamingInfo.Science']='./modules/ExpGamingInfo/Science', ['ExpGamingCore.Role']={'./modules/ExpGamingCore/Role','ExpGamingLib','FactorioStdLib.Table','FactorioStdLib.Game','ExpGamingCore.Group'},
['ExpGamingInfo.Rockets']='./modules/ExpGamingInfo/Rockets', ['ExpGamingCore.Group']={'./modules/ExpGamingCore/Group','FactorioStdLib','ExpGamingLib','FactorioStdLib.Game'},
['ExpGamingInfo.Readme']='./modules/ExpGamingInfo/Readme', ['ExpGamingCore.Sync']={'./modules/ExpGamingCore/Sync','ExpGamingLib','FactorioStdLib.Color','FactorioStdLib.Game','FactorioStdLib.Table'},
['ExpGamingInfo']='./modules/ExpGamingInfo', ['ExpGamingPlayer.inventorySearch']={'./modules/ExpGamingPlayer/inventorySearch','ExpGamingLib','ExpGamingAdmin.TempBan','ExpGamingAdmin.Warnings','FactorioStdLib.Game','ExpGamingAdmin.AdminLib'},
['ExpGamingCore']='./modules/ExpGamingCore', ['ExpGamingCore.Command']={'./modules/ExpGamingCore/Command','ExpGamingLib','FactorioStdLib.Table','FactorioStdLib.Color','FactorioStdLib.Game'},
['ExpGamingBot.discordAlerts']='./modules/ExpGamingBot/discordAlerts', ['ExpGamingInfo.Readme']={'./modules/ExpGamingInfo/Readme','ExpGamingCore.Gui','FactorioStdLib.Game'},
['ExpGamingBot.autoMessage']='./modules/ExpGamingBot/autoMessage', ['ExpGamingInfo.Rockets']={'./modules/ExpGamingInfo/Rockets','ExpGamingCore.Gui','FactorioStdLib.Game'},
['ExpGamingBot']='./modules/ExpGamingBot', ['ExpGamingPlayer.afkKick']={'./modules/ExpGamingPlayer/afkKick','FactorioStdLib.Game','ExpGamingCore.Gui'},
['ExpGamingAdmin.AdminLib']='./modules/ExpGamingAdmin/AdminLib', ['ExpGamingInfo.Science']={'./modules/ExpGamingInfo/Science','ExpGamingCore.Gui','FactorioStdLib.Game'},
['ExpGamingAdmin.AdminLib']='./modules/ExpGamingAdmin/AdminLib', ['ExpGamingPlayer.playerList']={'./modules/ExpGamingPlayer/playerList','FactorioStdLib.Game','ExpGamingCore.Gui'},
['ExpGamingAdmin.TempBan']='./modules/ExpGamingAdmin/TempBan', ['ExpGamingInfo.Tasklist']={'./modules/ExpGamingInfo/Tasklist','ExpGamingCore.Gui','ExpGamingCore.Role','FactorioStdLib.Game'},
['ExpGamingAdmin.ClearInventory']='./modules/ExpGamingAdmin/ClearInventory', ['FactorioStdLib.String']={'./modules/FactorioStdLib/String',},
['ExpGamingAdmin.TempBan']='./modules/ExpGamingAdmin/TempBan', ['FactorioStdLib.Game']={'./modules/FactorioStdLib/Game',},
['ExpGamingCommands.repair']='./modules/ExpGamingCommands/repair', ['ExpGamingPlayer.polls']={'./modules/ExpGamingPlayer/polls','ExpGamingCore.Gui','ExpGamingCore.Server'},
['ExpGamingPlayer.playerList']='./modules/ExpGamingPlayer/playerList', ['ExpGamingPlayer.playerInfo']={'./modules/ExpGamingPlayer/playerInfo','FactorioStdLib.Game','ExpGamingCore.Gui'},
['ExpGamingAdmin.Reports']='./modules/ExpGamingAdmin/Reports', ['FactorioStdLib.Table']={'./modules/FactorioStdLib/Table',},
['ExpGamingAdmin.Warnings']='./modules/ExpGamingAdmin/Warnings', ['FactorioStdLib.Color']={'./modules/FactorioStdLib/Color',},
['ExpGamingAdmin.Warnings']='./modules/ExpGamingAdmin/Warnings', ['ExpGamingCore.Gui.center']={'./modules/ExpGamingCore/Gui/center','mod-gui','FactorioStdLib.Game','FactorioStdLib.Color','ExpGamingCore.Gui','ExpGamingCore.Gui.inputs'},
['ExpGamingPlayer.inventorySearch']='./modules/ExpGamingPlayer/inventorySearch', ['ExpGamingCore.Gui.popup']={'./modules/ExpGamingCore/Gui/popup','mod-gui','FactorioStdLib.Game','ExpGamingCore.Gui','ExpGamingCore.Gui.inputs'},
['ExpGamingPlayer']='./modules/ExpGamingPlayer', ['ExpGamingCore.Gui.inputs']={'./modules/ExpGamingCore/Gui/inputs','mod-gui','FactorioStdLib.Color','FactorioStdLib.Game','ExpGamingCore.Gui'},
['ExpGamingAdmin.Gui']='./modules/ExpGamingAdmin/Gui', ['ExpGamingCore.Gui.left']={'./modules/ExpGamingCore/Gui/left','mod-gui','FactorioStdLib.Game','ExpGamingCore.Server','FactorioStdLib.Color','ExpGamingCore.Gui','ExpGamingCore.Gui.inputs'},
['ExpGamingAdmin.Gui']='./modules/ExpGamingAdmin/Gui', ['ExpGamingCore.Gui.toolbar']={'./modules/ExpGamingCore/Gui/toolbar','mod-gui','FactorioStdLib.Game','ExpGamingCore.Gui','ExpGamingCore.Gui.inputs'},
['ExpGamingAdmin.Teleport']='./modules/ExpGamingAdmin/Teleport',
['ExpGamingAdmin.Teleport']='./modules/ExpGamingAdmin/Teleport',
['ExpGamingCommands.teleport']='./modules/ExpGamingCommands/teleport',
['ExpGamingCommands']='./modules/ExpGamingCommands',
['ExpGamingAdmin.Kick']='./modules/ExpGamingAdmin/Kick',
['ExpGamingAdmin.Jail']='./modules/ExpGamingAdmin/Jail',
['ExpGamingAdmin.Commands']='./modules/ExpGamingAdmin/Commands',
['ExpGamingAdmin.Ban']='./modules/ExpGamingAdmin/Ban',
['ExpGamingAdmin']='./modules/ExpGamingAdmin',
['DeconControl']='./modules/DeconControl',
['ChatPopup']='./modules/ChatPopup',
['AdvancedStartingItems']='./modules/AdvancedStartingItems',
} }

View File

@@ -1,32 +0,0 @@
{
"name": "ExpGamingScenario",
"version": "0.16.51",
"type": "Scenario",
"description": "Explosive gaming's factorio secenario ran on every public server",
"modules": {
"ExpGamingCore": "^4.0.0",
"ExpGamingLib": "^4.0.0",
"FactorioStdLib.Color": "^0.8.0",
"FactorioStdLib.Game": "^0.8.0",
"FactorioStdLib.String": "^0.8.0",
"FactorioStdLib.Table": "^0.8.0",
"FactorioStdLib": "^0.8.0",
"ExpGamingCommands": "^4.0.0",
"ExpGamingPlayer": "^4.0.0",
"ExpGamingAdmin": "^4.0.0",
"ExpGamingBot": "^4.0.0",
"AdvancedStartingItems": "^4.0.0",
"ChatPopup": "^4.0.0",
"DamagePopup": "^4.0.0",
"DeathMarkers": "^4.0.0",
"DeconControl": "^4.0.0",
"ExpGamingInfo": "^4.0.0",
"GameSettingsGui": "^4.0.0",
"GuiAnnouncements": "^4.0.0",
"HealthIndicator": "^1.0.1",
"PlayerAutoColor": "^4.0.0",
"SpawnArea": "^4.0.0",
"WarpPoints": "^4.0.0",
"WornPaths": "^4.0.0"
}
}