Exclude round one records from match history and statistics
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { BetaPlan, RequirementProgress } from '../../beta-plan.js';
|
||||
import type { GameEvent } from '../../telemetry.js';
|
||||
import { MIN_RECORDED_ROUND } from '../../match-history.js';
|
||||
|
||||
export interface MatchEvidence {
|
||||
map: string;
|
||||
@@ -46,6 +47,7 @@ export function applyGameEvent(plan: BetaPlan, metrics: TestMetrics, event: Game
|
||||
if (r.kind === 'round') metrics.values[r.id] = Math.max(current, event.round);
|
||||
}
|
||||
if (event.event === 'game_end' && r.kind === 'matches'
|
||||
&& event.round >= MIN_RECORDED_ROUND
|
||||
&& (match.rounds[r.id] ?? -1) >= r.minRound
|
||||
&& (r.minMinutes === 0 || (match.started !== undefined && now - match.started >= r.minMinutes * 60_000))) {
|
||||
metrics.values[r.id] = current + 1;
|
||||
|
||||
Reference in New Issue
Block a user