mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Fix online time export in 2.0 w backwards compat
This commit is contained in:
1 parent
fbdf206e31
commit
5d37712db4
1 file changed
+5
-1
@@ -416,7 +416,11 @@ local players = {}
|
|||||||
for _, p in pairs(game.players) do
|
for _, p in pairs(game.players) do
|
||||||
players[p.name] = p.online_time
|
players[p.name] = p.online_time
|
||||||
end
|
end
|
||||||
rcon.print(game.table_to_json(players))`.replace(/\r?\n/g, " ");
|
if helpers ~= nil then
|
||||||
|
rcon.print(helpers.table_to_json(players))
|
||||||
|
else
|
||||||
|
rcon.print(game.table_to_json(players))
|
||||||
|
end`.replace(/\r?\n/g, " ");
|
||||||
let playerTimes: Record<string, number> = JSON.parse(await this.sendRcon(exportPlayerTimes));
|
let playerTimes: Record<string, number> = JSON.parse(await this.sendRcon(exportPlayerTimes));
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user