|
|
@ -40,8 +40,7 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
|
|
|
tmpFlagCaptureData;
|
|
|
|
tmpFlagCaptureData;
|
|
|
|
|
|
|
|
|
|
|
|
colorScheme = {
|
|
|
|
colorScheme = {
|
|
|
|
domain: [Fraction.COLOR_BLUFOR, Fraction.COLOR_OPFOR, Fraction.COLOR_BLUFOR_LIGHT, Fraction.COLOR_OPFOR_LIGHT,
|
|
|
|
domain: [Fraction.COLOR_BLUFOR, Fraction.COLOR_OPFOR]
|
|
|
|
Fraction.COLOR_BLUFOR_DARK, Fraction.COLOR_OPFOR_DARK, Fraction.COLOR_BLUFOR_GREY, Fraction.COLOR_OPFOR_GREY]
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
labelPoints = 'Punkte';
|
|
|
|
labelPoints = 'Punkte';
|
|
|
@ -260,8 +259,7 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
|
|
|
if (this.initialized.vehicle) {
|
|
|
|
if (this.initialized.vehicle) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let vehicleKillCountBlufor = 0, vehicleKillCountOpfor = 0, vehicleLightCountBlufor = 0, vehicleHeavyCountBlufor = 0,
|
|
|
|
let vehicleKillCountBlufor = 0, vehicleKillCountOpfor = 0;
|
|
|
|
vehicleAirCountBlufor = 0, vehicleLightCountOpfor = 0, vehicleHeavyCountOpfor = 0, vehicleAirCountOpfor = 0;
|
|
|
|
|
|
|
|
for (const {transportEntry: vehicleEntry, index} of this.logData.vehicle.map((transport, pos) => ({
|
|
|
|
for (const {transportEntry: vehicleEntry, index} of this.logData.vehicle.map((transport, pos) => ({
|
|
|
|
transportEntry: transport,
|
|
|
|
transportEntry: transport,
|
|
|
|
index: pos
|
|
|
|
index: pos
|
|
|
@ -269,40 +267,12 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
|
|
|
const vehicleEntryDate = new Date(vehicleEntry.time);
|
|
|
|
const vehicleEntryDate = new Date(vehicleEntry.time);
|
|
|
|
if (vehicleEntry.fraction === 'BLUFOR') {
|
|
|
|
if (vehicleEntry.fraction === 'BLUFOR') {
|
|
|
|
vehicleKillCountBlufor++;
|
|
|
|
vehicleKillCountBlufor++;
|
|
|
|
switch (vehicleEntry.vehicleClass) {
|
|
|
|
|
|
|
|
case 'LIGHT':
|
|
|
|
|
|
|
|
vehicleLightCountBlufor++;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'HEAVY':
|
|
|
|
|
|
|
|
vehicleHeavyCountBlufor++;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'AIR':
|
|
|
|
|
|
|
|
vehicleAirCountBlufor++;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
vehicleKillCountOpfor++;
|
|
|
|
vehicleKillCountOpfor++;
|
|
|
|
switch (vehicleEntry.vehicleClass) {
|
|
|
|
|
|
|
|
case 'LIGHT':
|
|
|
|
|
|
|
|
vehicleLightCountOpfor++;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'HEAVY':
|
|
|
|
|
|
|
|
vehicleHeavyCountOpfor++;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'AIR':
|
|
|
|
|
|
|
|
vehicleAirCountOpfor++;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.isTwoMinutesAhead(vehicleEntryDate, this.tmpVehicleData) || index === this.logData.vehicle.length - 1) {
|
|
|
|
if (this.isTwoMinutesAhead(vehicleEntryDate, this.tmpVehicleData) || index === this.logData.vehicle.length - 1) {
|
|
|
|
this.tmpVehicleData[0].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleKillCountBlufor));
|
|
|
|
this.tmpVehicleData[0].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleKillCountBlufor));
|
|
|
|
this.tmpVehicleData[1].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleKillCountOpfor));
|
|
|
|
this.tmpVehicleData[1].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleKillCountOpfor));
|
|
|
|
this.tmpVehicleData[2].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleLightCountBlufor));
|
|
|
|
|
|
|
|
this.tmpVehicleData[3].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleLightCountOpfor));
|
|
|
|
|
|
|
|
this.tmpVehicleData[4].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleHeavyCountBlufor));
|
|
|
|
|
|
|
|
this.tmpVehicleData[5].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleHeavyCountOpfor));
|
|
|
|
|
|
|
|
this.tmpVehicleData[6].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleAirCountBlufor));
|
|
|
|
|
|
|
|
this.tmpVehicleData[7].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleAirCountOpfor));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.addFinalTimeData(this.tmpVehicleData);
|
|
|
|
this.addFinalTimeData(this.tmpVehicleData);
|
|
|
@ -366,9 +336,7 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
|
|
|
this.tmpBudgetData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpBudgetData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpKillData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpKillData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpFrienlyFireData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpFrienlyFireData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpVehicleData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR,
|
|
|
|
this.tmpVehicleData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
Fraction.BLUFOR.concat(' Leicht'), Fraction.OPFOR.concat(' Leicht'), Fraction.BLUFOR.concat(' Schwer'),
|
|
|
|
|
|
|
|
Fraction.OPFOR.concat(' Schwer'), Fraction.BLUFOR.concat(' Luft'), Fraction.OPFOR.concat(' Luft'));
|
|
|
|
|
|
|
|
this.tmpTransportData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpTransportData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpReviveData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpReviveData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpStabilizeData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
|
this.tmpStabilizeData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
|
|
|
@ -390,7 +358,7 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
|
|
|
this.tmpBudgetData[0].series.push(ChartUtils.getSeriesEntry(endDate, this.war.endBudgetBlufor));
|
|
|
|
this.tmpBudgetData[0].series.push(ChartUtils.getSeriesEntry(endDate, this.war.endBudgetBlufor));
|
|
|
|
this.tmpBudgetData[1].series.push(ChartUtils.getSeriesEntry(endDate, this.war.endBudgetOpfor));
|
|
|
|
this.tmpBudgetData[1].series.push(ChartUtils.getSeriesEntry(endDate, this.war.endBudgetOpfor));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
for (let j = 0; j < tmpCollection.length; j++) {
|
|
|
|
for (const j in [0, 1]) {
|
|
|
|
if (tmpCollection[j].series[tmpCollection[j].series.length - 1].name < endDate) {
|
|
|
|
if (tmpCollection[j].series[tmpCollection[j].series.length - 1].name < endDate) {
|
|
|
|
tmpCollection[j].series.push(
|
|
|
|
tmpCollection[j].series.push(
|
|
|
|
ChartUtils.getSeriesEntry(endDate, tmpCollection[j].series[tmpCollection[j].series.length - 1].value)
|
|
|
|
ChartUtils.getSeriesEntry(endDate, tmpCollection[j].series[tmpCollection[j].series.length - 1].value)
|
|
|
@ -399,4 +367,5 @@ export class FractionStatsComponent implements OnInit, OnChanges {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|