Battle log initial

This commit is contained in:
Kalle
2026-08-07 09:55:34 +03:00
parent 9b5a3ef028
commit eaade46354
24 changed files with 1228 additions and 57 deletions

View File

@@ -8,6 +8,7 @@
* Usage: pnpm scanner:report
*/
import { loadOpenCV } from "../../app/features/scanner/core/cv";
import { createBattleLogDetector } from "../../app/features/scanner/core/detectors/battle-log/index";
import {
createDeathDetector,
type DeathData,
@@ -59,6 +60,12 @@ const configs: Config[] = [
fixturesDir: "scoreboard-replay",
event: "ScoreboardReplay",
},
{
label: "battle-log",
detector: createBattleLogDetector(resources),
fixturesDir: "battle-log",
event: "BattleLog",
},
];
interface Tally {
@@ -190,8 +197,10 @@ for (const config of configs) {
console.info(`\n=== ${config.label} (${fixtures.length} fixtures) ===`);
console.info(`gate ${pct(tally.gate)}`);
console.info(`header ${pct(tally.header)}`);
if (config.event === "ScoreboardReplay") {
if (tally.timestamp.total > 0) {
console.info(`timestamp ${pct(tally.timestamp)}`);
}
if (tally.replayCode.total > 0) {
console.info(`replayCode ${pct(tally.replayCode)}`);
}
console.info(`matchScores ${pct(tally.matchScores)}`);