Private
Public Access
1
0

Add player kill tracking and update version to 0.1.7

This commit is contained in:
Jan Grießhaber
2026-01-02 19:12:07 +01:00
parent 0660a7642b
commit 8d0aa8b826
3 changed files with 16 additions and 2 deletions

View File

@@ -8,6 +8,19 @@ function GetMods()
helpers.send_udp(udpAddress, modstring,serverIndex)
end
function GetPlayerKills()
local killParts = {}
killParts[#killParts+1] = "---player-kills---\n"
for killerIndex, victims in pairs(storage.playerKillCount) do
for victimIndex, kills in pairs(victims) do
local killerName = game.players(killerIndex)
local victimName = game.players(victimIndex)
killParts[#killParts+1] = ("%s:%s:%s:%s:%d"):format(killerIndex,killerName,victimIndex,victimName,kills)
end
end
return table.concat(killParts,"\n")
end
function GetMapSeed()
return("---map-seed---\n%d"):format(game.surfaces["nauvis"].map_gen_settings.seed)
end