Fix point string resolve for OPFOR in default PUNKTE entry
parent
3adc751ac8
commit
854a9720f5
|
@ -172,6 +172,7 @@ const parseWarLog = (lineArray, war) => {
|
||||||
* POINTS
|
* POINTS
|
||||||
*/
|
*/
|
||||||
stats.clean.push(line);
|
stats.clean.push(line);
|
||||||
|
|
||||||
const pt = line.split(WHITESPACE);
|
const pt = line.split(WHITESPACE);
|
||||||
|
|
||||||
if (line.includes('Endpunktestand')) {
|
if (line.includes('Endpunktestand')) {
|
||||||
|
@ -180,6 +181,8 @@ const parseWarLog = (lineArray, war) => {
|
||||||
// EXIT LOOP
|
// EXIT LOOP
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
console.log(getPointsEntry(pt, line, war._id, war.date))
|
||||||
|
|
||||||
stats.points.push(getPointsEntry(pt, line, war._id, war.date));
|
stats.points.push(getPointsEntry(pt, line, war._id, war.date));
|
||||||
}
|
}
|
||||||
} else if (line.includes('(Revive)')) {
|
} else if (line.includes('(Revive)')) {
|
||||||
|
@ -221,7 +224,7 @@ const parseWarLog = (lineArray, war) => {
|
||||||
fraction: driver ? driver.fraction : 'NONE',
|
fraction: driver ? driver.fraction : 'NONE',
|
||||||
distance: distance,
|
distance: distance,
|
||||||
});
|
});
|
||||||
} else if (line.includes('(Fraktionsuebersicht)')) {
|
} else if (line.includes('(Fraktionsuebersicht)') || line.includes('Fraktionsübersicht')) {
|
||||||
/**
|
/**
|
||||||
* PLAYERS
|
* PLAYERS
|
||||||
*/
|
*/
|
||||||
|
@ -287,7 +290,7 @@ const getPointsEntry = (pt, line, warId, warDate) => {
|
||||||
war: warId,
|
war: warId,
|
||||||
time: getFullTimeDate(warDate, pt[5]),
|
time: getFullTimeDate(warDate, pt[5]),
|
||||||
ptBlufor: parseInt(pt[10]),
|
ptBlufor: parseInt(pt[10]),
|
||||||
ptOpfor: parseInt(pt[13].slice(0, -3)),
|
ptOpfor: parseInt(pt[13].slice(0, -2)),
|
||||||
fraction: line.includes('Kein Dominator') ? 'NONE' : line.includes('NATO +1') ? 'BLUFOR' : 'OPFOR',
|
fraction: line.includes('Kein Dominator') ? 'NONE' : line.includes('NATO +1') ? 'BLUFOR' : 'OPFOR',
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue