From 887d9b8017d22c130ac42529bf732e4f590eee67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sat, 13 Jul 2024 14:23:31 -0500 Subject: [PATCH] fix: only allow d120 tanks --- scripts/averages.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/averages.ts b/scripts/averages.ts index ce1e67366..ba8f2f098 100644 --- a/scripts/averages.ts +++ b/scripts/averages.ts @@ -130,13 +130,16 @@ times(THREADS, async () => { async function postWork() { console.log( - `Generating statistics based off ${samples.d_120.toLocaleString()} players (${samples.total.toLocaleString()} checked in total) and ${tankIds.length} tanks...`, + `Generating statistics based on ${samples.d_120.toLocaleString()} players (${samples.total.toLocaleString()} checked in total) and ${tankIds.length} tanks...`, ); const averages: Record = {}; tankIds.forEach((id) => { - const tanks = tanksSorted[id]; + const tanksSortedEntry = tanksSorted[id]; + const tanks = tanksSortedEntry.filter( + (tank) => Date.now() - tank.last_battle_time * 1000 <= MAX_ACTIVITY_TIME, + ); const entry: AverageDefinitionsEntrySubPartial = { mu: {}, sigma: {},