Fixed send size of player entity stats
This commit is contained in:
@@ -32,7 +32,7 @@ function GetPlayerKills()
|
||||
return table.concat(killParts, "\n")
|
||||
end
|
||||
|
||||
function GetPlayerEntityStats()
|
||||
function SendPlayerEntityStats()
|
||||
local entityParts = {}
|
||||
entityParts[#entityParts + 1] = "---player-build-stats---"
|
||||
for playerIndex, items in pairs(storage.constructedEntites) do
|
||||
@@ -41,13 +41,16 @@ function GetPlayerEntityStats()
|
||||
entityParts[#entityParts + 1] = ("%s:%s:constructed:%s:%s"):format(playerIndex, playerName, itemName, itemCount)
|
||||
end
|
||||
end
|
||||
helpers.send_udp(udpAddress,table.concat(entityParts,"\n",serverIndex))
|
||||
entityParts = {}
|
||||
entityParts[#entityParts + 1] = "---player-build-stats---"
|
||||
for playerIndex, items in pairs(storage.deconstructedEntities) do
|
||||
local playerName = game.players[playerIndex].name
|
||||
for itemName, itemCount in pairs(items) do
|
||||
entityParts[#entityParts + 1] = ("%s:%s:deconstructed:%s:%s"):format(playerIndex, playerName, itemName, itemCount)
|
||||
end
|
||||
end
|
||||
return table.concat(entityParts, "\n")
|
||||
helpers.send_udp(udpAddress,table.concat(entityParts,"\n",serverIndex))
|
||||
end
|
||||
|
||||
function GetMapSeed()
|
||||
|
||||
Reference in New Issue
Block a user