From d815fd4e7599e693536c08e3298f1a57aff9f15c Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 2 Nov 2018 20:08:31 +0000 Subject: [PATCH] Updates To Sync --- modules/ExpGamingCore/Sync/control.lua | 10 +++++----- modules/ExpGamingCore/Sync/src/ranking.lua | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/ExpGamingCore/Sync/control.lua b/modules/ExpGamingCore/Sync/control.lua index 482459fb..df46880c 100644 --- a/modules/ExpGamingCore/Sync/control.lua +++ b/modules/ExpGamingCore/Sync/control.lua @@ -4,8 +4,8 @@ -- @author Cooldude2606 -- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE -local Game = require('FactorioStdLib.Game') -local Color = require('FactorioStdLib.Color') +local Game = require('FactorioStdLib.Game@^0.8.0') +local Color = require('FactorioStdLib.Color@^0.8.0') local Sync = {} local Sync_updates = {} @@ -309,9 +309,9 @@ script.on_event('on_pre_player_left_game',Sync.emit_update) script.on_event('on_rocket_launched',Sync.emit_update) function Sync:on_init() - if loaded_modules['ExpGamingCore.Gui'] then verbose('ExpGamingCore.Gui is installed; Loading gui src') require(module_path..'/src/gui',{Sync=Sync,module_path=module_path}) end - if loaded_modules['ExpGamingCore.Role'] then verbose('ExpGamingCore.Role is installed; Loading role src') require(module_path..'/src/ranking',{Sync=Sync}) end - if loaded_modules['ExpGamingCore.Server'] then require('ExpGamingCore.Server').add_module_to_interface('Sync','ExpGamingCore.Sync') end + if loaded_modules['ExpGamingCore.Gui@^4.0.0'] then verbose('ExpGamingCore.Gui is installed; Loading gui src') require(module_path..'/src/gui',{Sync=Sync,module_path=module_path}) end + if loaded_modules['ExpGamingCore.Role@^4.0.0'] then verbose('ExpGamingCore.Role is installed; Loading role src') require(module_path..'/src/ranking',{Sync=Sync}) end + if loaded_modules['ExpGamingCore.Server@^4.0.0'] then require('ExpGamingCore.Server@^4.0.0').add_module_to_interface('Sync','ExpGamingCore.Sync') end end function Sync:on_post() diff --git a/modules/ExpGamingCore/Sync/src/ranking.lua b/modules/ExpGamingCore/Sync/src/ranking.lua index 73bbd043..92ba6a81 100644 --- a/modules/ExpGamingCore/Sync/src/ranking.lua +++ b/modules/ExpGamingCore/Sync/src/ranking.lua @@ -7,14 +7,14 @@ --- This file will be loaded when ExpGamingCore.Role is present -- @function _comment -local Game = require('FactorioStdLib.Game') -local Color = require('FactorioStdLib.Color') -local Role = require('ExpGamingCore.Role') +local Game = require('FactorioStdLib.Game@^0.8.0') +local Color = require('FactorioStdLib.Color@^0.8.0') +local Role = require('ExpGamingCore.Role@^4.0.0') --- Used as a redirect to Role._base_preset that will set the rank given to a player apon joining -- @usage Sync.set_roles{player_name=rank_name,...} function Sync.set_roles(...) - Role._base_preset(...) + Role.set_preassign(...) end --- Used to get the number of players in each rank and currently online