mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-28 12:05:21 +09:00
Added ExpGamingAdmin
This commit is contained in:
@@ -37,6 +37,7 @@ end
|
||||
-- @treturn table the gui element flow
|
||||
function center.get_flow(player)
|
||||
local player = Game.get_player(player)
|
||||
if not player then error('Invalid player') end
|
||||
return player.gui.center.exp_center or player.gui.center.add{name='exp_center',type='flow'}
|
||||
end
|
||||
|
||||
@@ -47,6 +48,7 @@ end
|
||||
-- @treturn boelon based on if it successed or not
|
||||
function center.open(player,center)
|
||||
local player = Game.get_player(player)
|
||||
if not player then error('Invalid player') return false end
|
||||
Gui.center.clear(player)
|
||||
if not Gui.data.center[center] then return false end
|
||||
Gui.data.center[center].open{
|
||||
@@ -64,6 +66,7 @@ end
|
||||
-- @treturn boelon based on if it successed or not
|
||||
function center.open_tab(player,center,tab)
|
||||
local player = Game.get_player(player)
|
||||
if not player then error('Invalid player') end
|
||||
if not Gui.center.open(player,center) then return false end
|
||||
local name = center..'_'..tab
|
||||
if not Gui.data.inputs_button[name] then return false end
|
||||
|
||||
@@ -29,6 +29,7 @@ local global = global{
|
||||
server_description='A factorio server for everyone',
|
||||
reset_time='On Demand',
|
||||
time='Day Mth 00 00:00:00 UTC Year',
|
||||
date='0000/00/00',
|
||||
time_set={0,'0.00M'},
|
||||
last_update={0,'0.00M'},
|
||||
time_period={18000,'5.00M'},
|
||||
@@ -282,12 +283,12 @@ end
|
||||
-- @usage Sync.time -- string
|
||||
-- @tparam[opt=nil] string set the date time to be set
|
||||
-- @treturn boolean if the datetime set was successful
|
||||
Sync.time=add_metatable({},function(set)
|
||||
Sync.time=add_metatable({},function(full,date)
|
||||
local info = Sync.info
|
||||
if not is_type(set,'string') then return false end
|
||||
info.time = set
|
||||
info.time_set[1] = game.tick
|
||||
info.time_set[2] = tick_to_display_format(game.tick)
|
||||
if not is_type(full,'string') then return false end
|
||||
info.time = full
|
||||
info.date = date
|
||||
info.time_set[1] = Sync.tick_format(game.tick)
|
||||
return true
|
||||
end,function() local info = Sync.info return info.time..' (+'..(game.tick-info.time_set[1])..' Ticks)' end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user