Add new transport parsing to stats upload

pull/24/head
HardiReady 2018-02-01 07:06:26 +01:00
parent 8ae4999593
commit c6b9858420
1 changed files with 20 additions and 20 deletions

View File

@ -140,26 +140,26 @@ const parseWarLog = (lineArray, war) => {
}); });
} }
// /** /**
// * TRANSPORT * TRANSPORT
// */ */
// else if (line.includes('Transport ||')) { else if (line.includes('(Transport)')) {
// stats.clean.push(line); stats.clean.push(line);
// const driverString = line.substring(line.lastIndexOf('wurde von ') + 10, line.lastIndexOf(' eingeflogen')); const driverString = line.substring(line.lastIndexOf('wurde von ') + 10, line.lastIndexOf(' eingeflogen'));
// const driver = getPlayerAndFractionFromString(driverString); const driver = getPlayerAndFractionFromString(driverString);
// const passengerString = line.substring(line.lastIndexOf('|| ') + 3, line.lastIndexOf(' wurde von')); const passengerString = line.substring(line.lastIndexOf('--- ') + 3, line.lastIndexOf(' wurde von'));
// const passenger = getPlayerAndFractionFromString(passengerString); const passenger = getPlayerAndFractionFromString(passengerString);
// const distance = parseInt(line.substring(line.lastIndexOf('eingeflogen (') + 13, line.lastIndexOf('m)') - 1)); const distance = parseInt(line.substring(line.lastIndexOf('eingeflogen (') + 13, line.lastIndexOf('m)') - 1));
//
// stats.transport.push({ stats.transport.push({
// war: war._id, war: war._id,
// time: getFullTimeDate(war.date, line.split(' ')[5]), time: getFullTimeDate(war.date, line.split(' ')[5]),
// driver: driver.name, driver: driver.name,
// passenger: passenger ? passenger.name : null, passenger: passenger ? passenger.name : null,
// fraction: driver.fraction, fraction: driver.fraction,
// distance: distance distance: distance
// }); });
// } }
/** /**
* PLAYERS * PLAYERS