mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 12:16:37 +09:00
Added ExpGamingInfo
This commit is contained in:
18
modules/ExpGamingInfo/Science/src/sync.lua
Normal file
18
modules/ExpGamingInfo/Science/src/sync.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
local Sync = require('ExpGamingCore.Sync@^4.0.0')
|
||||
local data = global['ExpGamingInfo.Science@^4.0.0']
|
||||
|
||||
Sync.add_update('science',function()
|
||||
local _return = {}
|
||||
for force_name,global in pairs(data) do
|
||||
if force_name ~= '_base' then
|
||||
_return[force_name] = {totals={},times={}}
|
||||
for i,name in pairs(science_packs) do
|
||||
local made = global.made[i]
|
||||
_return[force_name].totals[name] = made
|
||||
local _made = string.format('%.2f',(made-global._made[i])/((global.update-global._update)/(3600*game.speed)))
|
||||
_return[force_name].times[name] = _made
|
||||
end
|
||||
end
|
||||
end
|
||||
return _return
|
||||
end)
|
||||
Reference in New Issue
Block a user