Private
Public Access
1
0

Add player death causes tracking and update version to 0.1.17

This commit is contained in:
Jan Grießhaber
2026-01-03 17:25:52 +01:00
parent 02b8d18f71
commit 0147851e7d
3 changed files with 13 additions and 1 deletions

View File

@@ -69,4 +69,15 @@ function GetPlayerDeaths()
deathParts[#deathParts+1] = ("%s:%d:%d"):format(player.name, player.index, storage.playerDeathCount[player.index]or 0)
end
return table.concat(deathParts, "\n")
end
function GetPlayerDeathCauses()
local deathParts = {}
deathParts[#deathParts+1] = "---player-death-cause---\n"
for playerIndex,deathCauses in pairs(storage.playerDeathCause) do
for causeName, causeCount in pairs(deathCauses) do
deathParts[#deathParts+1] = ("%s:%d:%s:%d"):format(game.players[playerIndex].name,playerIndex,causeName,causeCount)
end
end
return table.concat(deathParts,"\n")
end