mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Updated Doc
This commit is contained in:
@@ -8,16 +8,25 @@ local Server = {}
|
||||
|
||||
--- Global Table
|
||||
-- @table global
|
||||
-- @field all a list of every thread (indexed by uuid)
|
||||
-- @field queue an index for threads which will be resolved (contains uuids)
|
||||
-- @field tick an index for threads which will run every tick (contains uuids)
|
||||
-- @field timeout an index for threads which will timeout (contains uuids)
|
||||
-- @field events an index of threads based on event ids (contains uuids)
|
||||
-- @field paused an index of pasued threads (contains uuids)
|
||||
-- @field named a name index for thread uuids
|
||||
-- @field print_to contains players that event details will be printed to
|
||||
-- @field uuid contains the random number generator for the uuid system
|
||||
local global = global{
|
||||
all={_n=0}, -- a list of every thread (indexed by uuid)
|
||||
queue={}, -- an index for threads which will be resolved (contains uuids)
|
||||
tick={}, -- an index for threads which will run every tick (contains uuids)
|
||||
timeout={}, -- an index for threads which will timeout (contains uuids)
|
||||
events={}, -- an index of threads based on event ids (contains uuids)
|
||||
paused={}, -- an index of pasued threads (contains uuids)
|
||||
named={}, -- a name index for thread uuids
|
||||
print_to={}, -- contains players that event details will be printed to
|
||||
uuid=nil -- contains the random number generator for the uuid system
|
||||
all={_n=0},
|
||||
queue={},
|
||||
tick={},
|
||||
timeout={},
|
||||
events={},
|
||||
paused={},
|
||||
named={},
|
||||
print_to={},
|
||||
uuid=nil
|
||||
}
|
||||
|
||||
--- Used to generate a new uuid for the thread system
|
||||
@@ -220,7 +229,7 @@ function Server.interface(callback,use_thread,env,...)
|
||||
end
|
||||
|
||||
--- The class for the server threads, allows abbilty to run async function
|
||||
-- @class Thread
|
||||
-- @type Thread
|
||||
-- @alias Server._thread
|
||||
Server._thread = {}
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
--- This file will be loaded when ExpGamingCore.Commands is present
|
||||
-- @function _comment
|
||||
|
||||
--- Runs the given input from the script
|
||||
-- @command interface
|
||||
-- @param code The code that will be ran
|
||||
commands.add_command('interface', 'Runs the given input from the script', {'code',true}, function(event,args)
|
||||
local callback = args.code
|
||||
-- looks for spaces, if non the it will prefix the command with return
|
||||
|
||||
@@ -6,30 +6,52 @@
|
||||
|
||||
local Sync = {}
|
||||
local Sync_updates = {}
|
||||
|
||||
--- Global Table
|
||||
-- @table global
|
||||
-- @field server_name the server name
|
||||
-- @field server_description a short description of the server
|
||||
-- @field reset_time the reset time of the server
|
||||
-- @field time the last knowen irl time
|
||||
-- @field time_set the last in game time that the time was set
|
||||
-- @field last_update the last time that this info was updated
|
||||
-- @field time_period how often this infomation is updated
|
||||
-- @field players a list of different player related states
|
||||
-- @field ranks a list of player ranks
|
||||
-- @field rockets the number of rockets launched
|
||||
-- @field mods the mods which are loaded
|
||||
local global = global{
|
||||
server_name='Factorio Server', -- the server name
|
||||
server_description='A factorio server for everyone', -- a short description of the server
|
||||
reset_time='On Demand', -- the reset time of the server
|
||||
time='Day Mth 00 00:00:00 UTC Year', -- the last knowen irl time
|
||||
time_set={0,'0.00M'}, -- the last in game time that the time was set
|
||||
last_update={0,'0.00M'}, -- the last time that this info was updated
|
||||
time_period={18000,'5.00M'}, -- how often this infomation is updated
|
||||
server_name='Factorio Server',
|
||||
server_description='A factorio server for everyone',
|
||||
reset_time='On Demand',
|
||||
time='Day Mth 00 00:00:00 UTC Year',
|
||||
time_set={0,'0.00M'},
|
||||
last_update={0,'0.00M'},
|
||||
time_period={18000,'5.00M'},
|
||||
players={
|
||||
online={'Offline'}, -- list of all players online
|
||||
n_online=0, -- the number of players online
|
||||
all={'Offline'}, -- list of all player on or offline
|
||||
n_all=0, -- the number of players who have joined the server
|
||||
admins_online=0, -- the number of admins online
|
||||
afk_players=0, -- the number of afk players
|
||||
times={'Offline'} -- the play times of every player
|
||||
}, -- a sub list of players in the game
|
||||
ranks={'Offline'}, -- a list of player ranks
|
||||
rockets=0, -- the number of rockets launched
|
||||
mods={'Offline'} -- the mods which are loaded
|
||||
online={'Offline'},
|
||||
n_online=0,
|
||||
all={'Offline'},
|
||||
n_all=0,
|
||||
admins_online=0,
|
||||
afk_players=0,
|
||||
times={'Offline'}
|
||||
},
|
||||
ranks={'Offline'},
|
||||
rockets=0,
|
||||
mods={'Offline'}
|
||||
}
|
||||
|
||||
--- Player sub-table
|
||||
-- @table global.players
|
||||
-- @field online list of all players online
|
||||
-- @field n_online the number of players online
|
||||
-- @field all list of all player on or offline
|
||||
-- @field n_all the number of players who have joined the server
|
||||
-- @field admins_online the number of admins online
|
||||
-- @field afk_players the number of afk players
|
||||
-- @field times the play times of every player
|
||||
|
||||
--- Used to standidise the tick format for any sync info
|
||||
-- @usage Sync.tick_format(60) -- return {60,'1.00M'}
|
||||
-- @treturn {number,string} table containg both the raw number and clean version of a time
|
||||
|
||||
Reference in New Issue
Block a user