mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-28 20:05:22 +09:00
Added verbose
This commit is contained in:
@@ -28,6 +28,7 @@ function Gui._get_data(key) return Gui_data[key] end
|
||||
|
||||
function Gui:_load_parts(parts)
|
||||
for _,part in pairs(parts) do
|
||||
verbose('Gui Extraction: '..part)
|
||||
self[part] = require('/GuiParts/'..part)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -17,11 +17,12 @@ Pass a table with the names of the objects you want and it will be return in tha
|
||||
|
||||
local StdExpCoreLib = {}
|
||||
|
||||
require '/commands'
|
||||
StdExpCoreLib.Ranking = require '/ranking'
|
||||
StdExpCoreLib.Server = require '/server'
|
||||
StdExpCoreLib.Sync = require '/sync'
|
||||
StdExpCoreLib.Gui = require '/gui'
|
||||
require('/commands')
|
||||
StdExpCoreLib.Ranking = require('/ranking')
|
||||
StdExpCoreLib.Server = require('/server')
|
||||
StdExpCoreLib.Sync = require('/sync')
|
||||
StdExpCoreLib.Gui = require('/gui')
|
||||
verbose('Begain Gui Part Loading')
|
||||
StdExpCoreLib.Gui:_load_parts{
|
||||
'inputs',
|
||||
'toolbar',
|
||||
@@ -34,6 +35,7 @@ return function(rtn)
|
||||
local _return = {}
|
||||
for _,name in pairs(rtn) do
|
||||
if StdExpCoreLib[name] then
|
||||
verbose('Core File Extraction: '..name)
|
||||
table.insert(_return,StdExpCoreLib[name])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -284,6 +284,7 @@ end
|
||||
-- see Addons/playerRanks for examples
|
||||
function Ranking._rank:edit(key,set_value,value)
|
||||
if game then return end
|
||||
verbose('Edited Rank: '..self.name..'/'..key)
|
||||
if set_value then self[key] = value return end
|
||||
if key == 'disallow' then
|
||||
self.disallow = table.merge(self.disallow,value,true)
|
||||
@@ -300,6 +301,7 @@ end
|
||||
function Ranking._group:create(obj)
|
||||
if game then return end
|
||||
if not is_type(obj.name,'string') then return end
|
||||
verbose('Created Group: '..obj.name)
|
||||
setmetatable(obj,{__index=Ranking._group})
|
||||
self.index = #Ranking._groups(names)+1
|
||||
obj.ranks = {}
|
||||
@@ -318,6 +320,7 @@ function Ranking._group:add_rank(obj)
|
||||
not is_type(obj.short_hand,'string') or
|
||||
not is_type(obj.tag,'string') or
|
||||
not is_type(obj.colour,'table') then return end
|
||||
verbose('Created Rank: '..obj.name)
|
||||
setmetatable(obj,{__index=Ranking._rank})
|
||||
obj.group = self
|
||||
obj.allow = obj.allow or {}
|
||||
@@ -336,6 +339,7 @@ end
|
||||
-- see Addons/playerRanks for examples
|
||||
function Ranking._group:edit(key,set_value,value)
|
||||
if game then return end
|
||||
verbose('Edited Group: '..self.name..'/'..key)
|
||||
if set_value then self[key] = value return end
|
||||
if key == 'disallow' then
|
||||
self.disallow = table.merge(self.disallow,value,true)
|
||||
|
||||
@@ -90,6 +90,13 @@ function Sync.emit_embeded(args)
|
||||
game.write_file('embeded.json',table.json(log_data)..'\n',true,0)
|
||||
end
|
||||
|
||||
-- set up error handle
|
||||
verbose('Set New Error Handle')
|
||||
_G.error_handle = function(err)
|
||||
local color = _G.Color and Color.to_hex(defines.text_color.bg) or '0x0'
|
||||
Sync.emit_embeded{title='SCRIPT ERROR',color=color,description='There was an error in the script @Developers ',Error=err}
|
||||
end
|
||||
|
||||
--- used to get the number of admins currently online
|
||||
-- @usage Sync.count_admins()
|
||||
-- @treturn int the number of admins online
|
||||
|
||||
Reference in New Issue
Block a user