Fix csv parsing, tests.

This commit is contained in:
maxswa
2025-02-24 19:03:56 -05:00
parent b3fc5846f3
commit 99fc97f05e
3 changed files with 13 additions and 5 deletions

View File

@@ -14,7 +14,7 @@
58378,99,14103220
13188,99,16573909
36283,99,15061037
17138,99,14670565
17137,99,14670565
8751,99,16169665
60803,99,14390315
1718,99,57850681
@@ -90,7 +90,7 @@
113862,201
1969,538
12346,671
5608,149
5606,149
550,2450
25557,310
1391,538
@@ -103,6 +103,6 @@
287,7096
97368,51
15591,2780
1000407,67
1000405,67
213696,25
240082,340
Can't render this file because it has a wrong number of fields in line 25.

View File

@@ -227,8 +227,14 @@ export function parseStats(csv: string): Stats {
const [leaguePoints, deadmanPoints] = activityObjects.splice(0, 2);
const bhObjects = activityObjects.splice(0, BH_MODES.length);
const clueObjects = activityObjects.splice(0, CLUES.length);
const [lastManStanding, pvpArena, soulWarsZeal, riftsClosed, colosseumGlory, collectionsLogged] =
activityObjects.splice(0, 6);
const [
lastManStanding,
pvpArena,
soulWarsZeal,
riftsClosed,
colosseumGlory,
collectionsLogged
] = activityObjects.splice(0, 6);
const bossObjects = activityObjects.splice(0, BOSSES.length);
const skills: Skills = skillObjects.reduce<Skills>((prev, curr, index) => {

View File

@@ -123,6 +123,7 @@ export const BOSSES: Boss[] = [
'corruptedGauntlet',
'hueycoatl',
'leviathan',
'royalTitans',
'whisperer',
'theatreOfBlood',
'theatreOfBloodHardMode',
@@ -158,6 +159,7 @@ export const ACTIVITIES: ActivityName[] = [
'soulWarsZeal',
'riftsClosed',
'colosseumGlory',
'collectionsLogged',
...BOSSES
];