Skip to content

Commit

Permalink
Fixup Meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraust committed Aug 10, 2024
1 parent adb53b7 commit 122e068
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion combatlog/templatetags/combatlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ def summary(instance):
res.append(instance.metadata.map)
res.append(f"{instance.metadata.difficulty} Difficulty")
res.append("DPS")
players = []
for _, player in instance.metadata.summary:
res.append(f"{player['handle']} - {int(player['DPS'])}")
print(player)
players.append(
{
"name": player["handle"],
"DPS": int(player["DPS"]),
}
)

players = sorted(players, reverse=True, key=lambda player: player["DPS"])
for player in players:
res.append(f"{player['name']} - {int(player['DPS']):,}")

return " | ".join(res)

0 comments on commit 122e068

Please sign in to comment.