Private
Public Access
1
0

Fixed send size of player entity stats

This commit is contained in:
Jan Grießhaber
2026-01-06 16:20:45 +01:00
parent a6e503da3d
commit cb2e6fec50
4 changed files with 11 additions and 6 deletions

View File

@@ -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()