From: Ant Zucaro Date: Wed, 8 Jul 2015 11:02:15 +0000 (-0400) Subject: Store and show goals in the "caps" field of team scores. Fixes #155. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e8beeac79a7010adef4d91a4a000a608171d0a0e;p=xonotic%2Fxonstat.git Store and show goals in the "caps" field of team scores. Fixes #155. --- diff --git a/xonstat/templates/game_info.mako b/xonstat/templates/game_info.mako index 02e0b9e..2b7cd70 100644 --- a/xonstat/templates/game_info.mako +++ b/xonstat/templates/game_info.mako @@ -73,6 +73,8 @@ ${tgstat.caps} % elif game.game_type_cd == 'ca': ${tgstat.rounds} + % elif game.game_type_cd == 'nb': + ${tgstat.caps} % else: ${tgstat.score} % endif diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 6792fc7..0fa55de 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -752,6 +752,7 @@ def create_team_stat(session, game, events): for (key,value) in events.items(): if key == 'scoreboard-score': teamstat.score = int(round(float(value))) if key == 'scoreboard-caps': teamstat.caps = int(value) + if key == 'scoreboard-goals': teamstat.caps = int(value) if key == 'scoreboard-rounds': teamstat.rounds = int(value) session.add(teamstat)