mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 04:06:39 +09:00
Updated Module to use require
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
local Game = require('FactorioStdLib.Game')
|
||||
local Color = require('FactorioStdLib.Color')
|
||||
|
||||
local Server = {}
|
||||
local module_verbose = false --true|false
|
||||
|
||||
@@ -464,7 +467,7 @@ end)
|
||||
|
||||
function Server:on_init()
|
||||
for name,id in pairs(defines.events) do if not script.get_event_handler(id) then script.on_event(id,Server._thread_handler) end end
|
||||
if loaded_modules.commands then verbose('ExpGamingCore.Commands is installed; Loading commands src') require(module_path..'/src/commands') end
|
||||
if loaded_modules['ExpGamingCore.Commands'] then verbose('ExpGamingCore.Commands is installed; Loading commands src') require(module_path..'/src/commands',{Server=Server}) end
|
||||
end
|
||||
|
||||
return Server
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"name": "Server",
|
||||
"version": "4.0.0",
|
||||
"module": "Server",
|
||||
"type": "Submodule",
|
||||
"description": "Adds a thread system and event listening and a admin bypass (recommend to disable /c and use optional /interface)",
|
||||
"location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Server.zip",
|
||||
"keywords": [
|
||||
"Library",
|
||||
"Lib",
|
||||
@@ -12,15 +15,15 @@
|
||||
"Interface",
|
||||
"Events"
|
||||
],
|
||||
"version": "4.0.0",
|
||||
"location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Server.zip",
|
||||
"author": "<blank>",
|
||||
"contact": "<blank>",
|
||||
"license": "<blank>",
|
||||
"dependencies": {
|
||||
"ExpGamingLib": "^4.0.0",
|
||||
"FactorioStdLib.Table": "^0.8.0",
|
||||
"FactorioStdLib.Color": "^0.8.0",
|
||||
"FactorioStdLib.String": "^0.8.0",
|
||||
"FactorioStdLib.Game": "^0.8.0",
|
||||
"ExpGamingCore.Ranking": "?^4.0.0",
|
||||
"ExpGamingCore.Commands": "?^4.0.0"
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@
|
||||
--- This file will be loaded when ExpGamingCore.Commands is present
|
||||
-- @function _comment
|
||||
|
||||
local Game = require('FactorioStdLib.Game')
|
||||
|
||||
--- Runs the given input from the script
|
||||
-- @command interface
|
||||
-- @param code The code that will be ran
|
||||
|
||||
Reference in New Issue
Block a user