Add kills tracking to player stats and update leaderboard display

This commit is contained in:
zhangyuheng
2026-02-11 11:44:04 +08:00
parent f6d6fdda8f
commit 94f041d513
3 changed files with 31 additions and 6 deletions

View File

@@ -144,6 +144,10 @@ function renderLeaderboards() {
// 5. Play Time (stats.play_time_raw)
const topPlayTime = getTop('play_time_fmt'); // uses play_time_raw internally
renderCard('lb-playtime', topPlayTime, p => p.stats.play_time_fmt);
// 6. Kills (stats.kills)
const topKills = getTop('kills');
renderCard('lb-kills', topKills, p => p.stats.kills);
}
function renderPlayerGrid(reset = false) {
@@ -228,6 +232,7 @@ function openModal(player) {
document.getElementById('modal-placed').innerText = player.stats.placed.toLocaleString();
document.getElementById('modal-mined').innerText = player.stats.mined.toLocaleString();
document.getElementById('modal-deaths').innerText = player.stats.deaths;
document.getElementById('modal-kills').innerText = player.stats.kills;
document.getElementById('modal-playtime').innerText = player.stats.play_time_fmt;
modal.style.display = "flex";