From 8e6c25d2079cd5155a86b723ff16f0ed3e2346e4 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Sat, 6 Jun 2015 09:20:58 -0400 Subject: [PATCH] Make valid NB games those w/ nonzero scores ONLY. Fixes #152. --- xonstat/views/submission.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index da7e3bc..006a437 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -100,6 +100,10 @@ def is_blank_game(gametype, players): 1) a match in which no player made a fastest lap AND was on the scoreboard + + ... or for NB, in which not all maps have weapons + + 1) a match in which no player made a positive or negative score """ r = re.compile(r'acc-.*-cnt-fired') flg_nonzero_score = False @@ -118,6 +122,8 @@ def is_blank_game(gametype, players): if gametype == 'cts': return not flg_fastest_lap + elif gametype == 'nb': + return not flg_nonzero_score else: return not (flg_nonzero_score and flg_acc_events) -- 2.39.2