mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-28 20:05:22 +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 Sync = {}
|
||||
local Sync_updates = {}
|
||||
local module_verbose = false --true|false
|
||||
@@ -292,8 +295,8 @@ script.on_event('on_tick',function(event)
|
||||
end)
|
||||
|
||||
function Sync:on_init()
|
||||
if loaded_modules.Gui then verbose('ExpGamingCore.Gui is installed; Loading gui src') require(module_path..'/src/gui') end
|
||||
if loaded_modules.Ranking then verbose('ExpGamingCore.Ranking is installed; Loading ranking src') require(module_path..'/src/ranking') end
|
||||
if loaded_modules['ExpGamingCore.Gui'] then verbose('ExpGamingCore.Gui is installed; Loading gui src') require(module_path..'/src/gui',{Sync=Sync}) end
|
||||
if loaded_modules['ExpGamingCore.Ranking'] then verbose('ExpGamingCore.Ranking is installed; Loading ranking src') require(module_path..'/src/ranking',{Sync=Sync}) end
|
||||
end
|
||||
|
||||
function Sync:on_post()
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"name": "Sync",
|
||||
"version": "4.0.0",
|
||||
"module": "Sync",
|
||||
"type": "Submodule",
|
||||
"description": "Allows syncing with an outside server and info panle.",
|
||||
"location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Sync.zip",
|
||||
"keywords": [
|
||||
"Library",
|
||||
"Lib",
|
||||
@@ -12,8 +15,9 @@
|
||||
"External",
|
||||
"Discord"
|
||||
],
|
||||
"version": "4.0.0",
|
||||
"location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Sync.zip",
|
||||
"author": "<blank>",
|
||||
"contact": "<blank>",
|
||||
"license": "<blank>",
|
||||
"dependencies": {
|
||||
"ExpGamingLib": "^4.0.0",
|
||||
"FactorioStdLib.Color": "^0.8.0",
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
--- This file will be loaded when ExpGamingCore.Gui is present
|
||||
-- @function _comment
|
||||
|
||||
local Game = require('FactorioStdLib.Game')
|
||||
local Gui = require('ExpGamingCore.Gui')
|
||||
|
||||
local Sync_gui_functions = {}
|
||||
|
||||
--- Adds a emeltent to the sever info gui
|
||||
|
||||
@@ -6,7 +6,11 @@
|
||||
|
||||
--- This file will be loaded when ExpGamingCore.Ranking is present
|
||||
-- @function _comment
|
||||
|
||||
|
||||
local Game = require('FactorioStdLib.Game')
|
||||
local Color = require('FactorioStdLib.Color')
|
||||
local Ranking = require('ExpGamingCore.Ranking')
|
||||
|
||||
--- Used as a redirect to Ranking._base_preset that will set the rank given to a player apon joining
|
||||
-- @usage Sync.set_ranks{player_name=rank_name,...}
|
||||
function Sync.set_ranks(...)
|
||||
|
||||
Reference in New Issue
Block a user