From e8beeac79a7010adef4d91a4a000a608171d0a0e Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Wed, 8 Jul 2015 07:02:15 -0400 Subject: [PATCH] Store and show goals in the "caps" field of team scores. Fixes #155. --- xonstat/templates/game_info.mako | 2 ++ xonstat/views/submission.py | 1 + 2 files changed, 3 insertions(+) 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) -- 2.39.2