]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Store and show goals in the "caps" field of team scores. Fixes #155.
authorAnt Zucaro <azucaro@gmail.com>
Wed, 8 Jul 2015 11:02:15 +0000 (07:02 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Wed, 8 Jul 2015 11:02:15 +0000 (07:02 -0400)
xonstat/templates/game_info.mako
xonstat/views/submission.py

index 02e0b9eb0aec3fdcae6b3cb02be11d54e21e00e7..2b7cd70670330224e6d0011b6eaea834e9f69f7e 100644 (file)
@@ -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
index 6792fc75511d946e97fb1a31475a5204231c2a4a..0fa55de1ddefd262935bbf7a95b0779bfdc3faef 100644 (file)
@@ -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)