Update version to 0.2.1, add player color retrieval, and enhance train trip statistics
Performance improvments for power stats
This commit is contained in:
@@ -8,6 +8,17 @@ function GetMods()
|
||||
helpers.send_udp(udpAddress, modstring,serverIndex)
|
||||
end
|
||||
|
||||
function GetPlayerColors()
|
||||
local colorParts = {}
|
||||
colorParts[#colorParts+1] = "---player-colors---\n"
|
||||
for index, player in pairs(game.players) do
|
||||
local colorSettings = player.color
|
||||
colorParts[#colorParts+1] = ("%d:%s:%d:%d:%d:%d"):format(index,player.name,colorSettings.r,colorSettings.g,colorSettings.b,colorSettings.a)
|
||||
end
|
||||
return table.concat(colorParts,"\n")
|
||||
end
|
||||
|
||||
|
||||
function GetPlayerKills()
|
||||
local killParts = {}
|
||||
killParts[#killParts+1] = "---player-kills---\n"
|
||||
|
||||
Reference in New Issue
Block a user