Compare commits
No commits in common. "db1222d0d50af1d41fc20453c037a878dacf46cf" and "910df3d2677faf5e6cc85b43e79f6f8847b3df15" have entirely different histories.
db1222d0d5
...
910df3d267
|
@ -77,9 +77,3 @@
|
||||||
+ `BLUFOR`
|
+ `BLUFOR`
|
||||||
+ `OPFOR`
|
+ `OPFOR`
|
||||||
+ `NONE`
|
+ `NONE`
|
||||||
+ vehicleClass: `LIGHT` (enum, required) - class of shot vehicle
|
|
||||||
+ Members
|
|
||||||
+ `LIGHT`
|
|
||||||
+ `HEAVY`
|
|
||||||
+ `AIR`
|
|
||||||
+ `UNKNOWN`
|
|
||||||
|
|
|
@ -7,9 +7,7 @@ Basic player statistic information object
|
||||||
+ fraction: `OPFOR` (string, required) - fraction of the player
|
+ fraction: `OPFOR` (string, required) - fraction of the player
|
||||||
+ kill: 5 (number, required) - sum of kills
|
+ kill: 5 (number, required) - sum of kills
|
||||||
+ friendlyFire: 0 (number, required) - sum of friendly fire kills
|
+ friendlyFire: 0 (number, required) - sum of friendly fire kills
|
||||||
+ vehicleLight: 1 (number, required) - sum of light vehicle kills
|
+ vehicle: 1 (number, required) - sum of vehicle kills
|
||||||
+ vehicleHeavy: 1 (number, required) - sum of heavy vehicle kills
|
|
||||||
+ vehicleAir: 0 (number, required) - sum of air vehicle kills
|
|
||||||
+ death: 3 (number, required) - sum of deaths
|
+ death: 3 (number, required) - sum of deaths
|
||||||
+ respawn: 2 (number, required) - sum of respawns
|
+ respawn: 2 (number, required) - sum of respawns
|
||||||
+ flagTouch: 1 (number, required) - sum of flag captures
|
+ flagTouch: 1 (number, required) - sum of flag captures
|
||||||
|
|
|
@ -12,9 +12,7 @@ Every highscore player object contains a field *sum*, representing its order num
|
||||||
+ kill (array[HighscorePlayer],required) - player highscore for kill
|
+ kill (array[HighscorePlayer],required) - player highscore for kill
|
||||||
+ death (array[HighscorePlayer],required) - player highscore for death
|
+ death (array[HighscorePlayer],required) - player highscore for death
|
||||||
+ friendlyFire (array[HighscorePlayer],required) - player highscore for friendly fire
|
+ friendlyFire (array[HighscorePlayer],required) - player highscore for friendly fire
|
||||||
+ vehicleLight (array[HighscorePlayer],required) - player highscore for light vehicle
|
+ vehicle (array[HighscorePlayer],required) - player highscore for vehicle
|
||||||
+ vehicleHeavy (array[HighscorePlayer],required) - player highscore for heavy vehicle
|
|
||||||
+ vehicleAir (array[HighscorePlayer],required) - player highscore for air vehicle
|
|
||||||
+ revive (array[HighscorePlayer],required) - player highscore for revive
|
+ revive (array[HighscorePlayer],required) - player highscore for revive
|
||||||
+ respawn (array[HighscorePlayer],required) - player highscore for respawn
|
+ respawn (array[HighscorePlayer],required) - player highscore for respawn
|
||||||
+ flagTouch (array[HighscorePlayer],required) - player highscore for flag captures
|
+ flagTouch (array[HighscorePlayer],required) - player highscore for flag captures
|
||||||
|
|
|
@ -25,11 +25,6 @@ const LogVehicleKillSchema = new Schema({
|
||||||
enum: ['BLUFOR', 'OPFOR', 'NONE'],
|
enum: ['BLUFOR', 'OPFOR', 'NONE'],
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
vehicleClass: {
|
|
||||||
type: String,
|
|
||||||
enum: ['LIGHT', 'HEAVY', 'AIR', 'UNKNOWN'],
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
}, {
|
}, {
|
||||||
collection: 'logVehicle',
|
collection: 'logVehicle',
|
||||||
});
|
});
|
||||||
|
|
|
@ -24,19 +24,7 @@ const PlayerSchema = new Schema({
|
||||||
set: (v) => Math.round(v),
|
set: (v) => Math.round(v),
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
vehicleLight: {
|
vehicle: {
|
||||||
type: Number,
|
|
||||||
get: (v) => Math.round(v),
|
|
||||||
set: (v) => Math.round(v),
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
vehicleHeavy: {
|
|
||||||
type: Number,
|
|
||||||
get: (v) => Math.round(v),
|
|
||||||
set: (v) => Math.round(v),
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
vehicleAir: {
|
|
||||||
type: Number,
|
type: Number,
|
||||||
get: (v) => Math.round(v),
|
get: (v) => Math.round(v),
|
||||||
set: (v) => Math.round(v),
|
set: (v) => Math.round(v),
|
||||||
|
|
|
@ -46,9 +46,7 @@ campaignPlayer.route('/ranking/:campaignId')
|
||||||
const resItem = {
|
const resItem = {
|
||||||
name: usesUUID ? playerInstances[playerInstances.length - 1].name : player,
|
name: usesUUID ? playerInstances[playerInstances.length - 1].name : player,
|
||||||
kill: 0,
|
kill: 0,
|
||||||
vehicleLight: 0,
|
vehicle: 0,
|
||||||
vehicleHeavy: 0,
|
|
||||||
vehicleAir: 0,
|
|
||||||
death: 0,
|
death: 0,
|
||||||
friendlyFire: 0,
|
friendlyFire: 0,
|
||||||
revive: 0,
|
revive: 0,
|
||||||
|
@ -59,9 +57,7 @@ campaignPlayer.route('/ranking/:campaignId')
|
||||||
resItem.kill += playerInstances[i].kill;
|
resItem.kill += playerInstances[i].kill;
|
||||||
resItem.death += playerInstances[i].death;
|
resItem.death += playerInstances[i].death;
|
||||||
resItem.friendlyFire += playerInstances[i].friendlyFire;
|
resItem.friendlyFire += playerInstances[i].friendlyFire;
|
||||||
resItem.vehicleLight += playerInstances[i].vehicleLight;
|
resItem.vehicle += playerInstances[i].vehicle;
|
||||||
resItem.vehicleHeavy += playerInstances[i].vehicleHeavy;
|
|
||||||
resItem.vehicleAir += playerInstances[i].vehicleAir;
|
|
||||||
resItem.revive += playerInstances[i].revive;
|
resItem.revive += playerInstances[i].revive;
|
||||||
resItem.respawn += playerInstances[i].respawn;
|
resItem.respawn += playerInstances[i].respawn;
|
||||||
resItem.flagTouch += playerInstances[i].flagTouch;
|
resItem.flagTouch += playerInstances[i].flagTouch;
|
||||||
|
@ -84,9 +80,7 @@ campaignPlayer.route('/ranking/:campaignId')
|
||||||
kill: getSortedField('kill'),
|
kill: getSortedField('kill'),
|
||||||
death: getSortedField('death'),
|
death: getSortedField('death'),
|
||||||
friendlyFire: getSortedField('friendlyFire'),
|
friendlyFire: getSortedField('friendlyFire'),
|
||||||
vehicleLight: getSortedField('vehicleLight'),
|
vehicle: getSortedField('vehicle'),
|
||||||
vehicleHeavy: getSortedField('vehicleHeavy'),
|
|
||||||
vehicleAir: getSortedField('vehicleAir'),
|
|
||||||
revive: getSortedField('revive'),
|
revive: getSortedField('revive'),
|
||||||
respawn: getSortedField('respawn'),
|
respawn: getSortedField('respawn'),
|
||||||
flagTouch: getSortedField('flagTouch'),
|
flagTouch: getSortedField('flagTouch'),
|
||||||
|
|
|
@ -4,13 +4,6 @@ const playerArrayContains = require('./util').playerArrayContains;
|
||||||
|
|
||||||
const WHITESPACE = ' ';
|
const WHITESPACE = ' ';
|
||||||
|
|
||||||
const VehicleClasses = Object.freeze({
|
|
||||||
LIGHT: 'Leicht',
|
|
||||||
HEAVY: 'Schwer',
|
|
||||||
AIR: 'Flug',
|
|
||||||
UNKNOWN: 'Unbekannt',
|
|
||||||
});
|
|
||||||
|
|
||||||
const parseWarLog = (lineArray, war) => {
|
const parseWarLog = (lineArray, war) => {
|
||||||
const NAME_TOO_LONG_ERROR = 'Error: ENAMETOOLONG: name too long, open \'';
|
const NAME_TOO_LONG_ERROR = 'Error: ENAMETOOLONG: name too long, open \'';
|
||||||
|
|
||||||
|
@ -28,7 +21,7 @@ const parseWarLog = (lineArray, war) => {
|
||||||
players: [],
|
players: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
const VEHICLE_BLACKLIST = [
|
const vehicleBlacklist = [
|
||||||
'Prowler (Unbewaffnet)', 'Prowler (Bewaffnet)', 'Hunter',
|
'Prowler (Unbewaffnet)', 'Prowler (Bewaffnet)', 'Hunter',
|
||||||
'HEMTT Transporter', 'HEMTT Transporter (abgedeckt)', 'HEMTT SanitÀtsfahrzeug',
|
'HEMTT Transporter', 'HEMTT Transporter (abgedeckt)', 'HEMTT SanitÀtsfahrzeug',
|
||||||
'Remote Designator [NATO]', 'UGV Stomper',
|
'Remote Designator [NATO]', 'UGV Stomper',
|
||||||
|
@ -74,7 +67,6 @@ const parseWarLog = (lineArray, war) => {
|
||||||
shooter: shooter ? shooter.name : null,
|
shooter: shooter ? shooter.name : null,
|
||||||
target: target ? target.name : null,
|
target: target ? target.name : null,
|
||||||
fraction: shooter ? shooter.fraction : 'NONE',
|
fraction: shooter ? shooter.fraction : 'NONE',
|
||||||
vehicleClass: target.vehicleClass,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -102,12 +94,10 @@ const parseWarLog = (lineArray, war) => {
|
||||||
// this date needs to be assigned in first place !important
|
// this date needs to be assigned in first place !important
|
||||||
const dateString = budg[0].slice(0, -1).split('/').map((s) => parseInt(s));
|
const dateString = budg[0].slice(0, -1).split('/').map((s) => parseInt(s));
|
||||||
stats.war.date = new Date(dateString[0], dateString[1] - 1, dateString[2]);
|
stats.war.date = new Date(dateString[0], dateString[1] - 1, dateString[2]);
|
||||||
console.log(war.date);
|
|
||||||
} else if (line.includes('Endbudget')) {
|
} else if (line.includes('Endbudget')) {
|
||||||
stats.war['endBudgetBlufor'] = transformMoneyString(budg[9].substr(1));
|
stats.war['endBudgetBlufor'] = transformMoneyString(budg[9].substr(1));
|
||||||
stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0, -1));
|
stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0, -1));
|
||||||
stats.war.endDate = getFullTimeDate(war.date, budg[5]);
|
stats.war.endDate = getFullTimeDate(war.date, budg[5]);
|
||||||
console.log(war.endDate);
|
|
||||||
} else {
|
} else {
|
||||||
stats.budget.push(getBudgetEntry(budg, war._id, war.date));
|
stats.budget.push(getBudgetEntry(budg, war._id, war.date));
|
||||||
}
|
}
|
||||||
|
@ -201,31 +191,14 @@ const parseWarLog = (lineArray, war) => {
|
||||||
for (let i = 0; i < stats.players.length; i++) {
|
for (let i = 0; i < stats.players.length; i++) {
|
||||||
const playerName = stats.players[i].name;
|
const playerName = stats.players[i].name;
|
||||||
stats.players[i]['respawn'] = stats.respawn.filter((res) => res.player === playerName).length;
|
stats.players[i]['respawn'] = stats.respawn.filter((res) => res.player === playerName).length;
|
||||||
|
|
||||||
stats.players[i]['kill'] = stats.kills.filter((kill) => kill.shooter === playerName && !kill.friendlyFire).length;
|
stats.players[i]['kill'] = stats.kills.filter((kill) => kill.shooter === playerName && !kill.friendlyFire).length;
|
||||||
|
stats.players[i]['vehicle'] = stats.vehicles.filter(
|
||||||
// TODO: use vehicle class description from enum
|
(vehicle) => vehicle.shooter === playerName && vehicleBlacklist.indexOf(vehicle.target) < 0).length;
|
||||||
stats.players[i]['vehicleLight'] = stats.vehicles.filter(
|
|
||||||
(vehicle) => vehicle.shooter === playerName && vehicle.vehicleClass === 'LIGHT' &&
|
|
||||||
VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
|
|
||||||
|
|
||||||
stats.players[i]['vehicleHeavy'] = stats.vehicles.filter(
|
|
||||||
(vehicle) => vehicle.shooter === playerName && vehicle.vehicleClass === 'HEAVY' &&
|
|
||||||
VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
|
|
||||||
|
|
||||||
stats.players[i]['vehicleAir'] = stats.vehicles.filter(
|
|
||||||
(vehicle) => vehicle.shooter === playerName && vehicle.vehicleClass === 'AIR' &&
|
|
||||||
VEHICLE_BLACKLIST.indexOf(vehicle.target) < 0).length;
|
|
||||||
|
|
||||||
stats.players[i]['friendlyFire'] = stats.kills.filter(
|
stats.players[i]['friendlyFire'] = stats.kills.filter(
|
||||||
(kill) => kill.shooter === playerName && kill.friendlyFire).length;
|
(kill) => kill.shooter === playerName && kill.friendlyFire).length;
|
||||||
|
|
||||||
stats.players[i]['death'] = stats.kills.filter((kill) => kill.target === playerName).length;
|
stats.players[i]['death'] = stats.kills.filter((kill) => kill.target === playerName).length;
|
||||||
|
|
||||||
stats.players[i]['revive'] = stats.revive.filter((rev) => rev.medic === playerName && !rev.stabilized).length;
|
stats.players[i]['revive'] = stats.revive.filter((rev) => rev.medic === playerName && !rev.stabilized).length;
|
||||||
|
|
||||||
stats.players[i]['flagTouch'] = stats.flag.filter((flag) => flag.player === playerName).length;
|
stats.players[i]['flagTouch'] = stats.flag.filter((flag) => flag.player === playerName).length;
|
||||||
|
|
||||||
stats.players[i]['sort'] = stats.players[i]['kill'] + stats.players[i]['revive'] + stats.players[i]['flagTouch']
|
stats.players[i]['sort'] = stats.players[i]['kill'] + stats.players[i]['revive'] + stats.players[i]['flagTouch']
|
||||||
- stats.players[i]['friendlyFire'] - stats.players[i]['death'] - stats.players[i]['respawn'];
|
- stats.players[i]['friendlyFire'] - stats.players[i]['death'] - stats.players[i]['respawn'];
|
||||||
}
|
}
|
||||||
|
@ -277,34 +250,19 @@ const getPlayerAndFractionFromString = (nameAndFractionString) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getVehicleAndFractionFromString = (nameClassFractionString) => {
|
const getVehicleAndFractionFromString = (nameAndFractionString) => {
|
||||||
const nameArray = nameClassFractionString.trim().split(WHITESPACE);
|
const nameArray = nameAndFractionString.trim().split(WHITESPACE);
|
||||||
|
const fractionPart = nameArray[nameArray.length - 1];
|
||||||
|
|
||||||
const vehicleFraction = nameArray[nameArray.length - 1];
|
// escape it is some parachute fraction identifier
|
||||||
nameArray.pop();
|
if (fractionPart === 'OPF_F' || fractionPart === 'BLU_F') {
|
||||||
const vehicleClassString = nameArray[nameArray.length - 1].replace('(', '').replace(')', '');
|
|
||||||
nameArray.pop();
|
|
||||||
const vehicleName = nameArray.join(WHITESPACE);
|
|
||||||
|
|
||||||
// skip logging here - this is some basic equipment identifier (i.e. parachute)
|
|
||||||
if (vehicleFraction === 'OPF_F' || vehicleFraction === 'BLU_F' || vehicleClassString === VehicleClasses.UNKNOWN) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fraction = vehicleFraction === '(OPT_NATO)' || vehicleFraction === '(OPT_NATO_T)' ? 'BLUFOR' : 'OPFOR';
|
const fraction = fractionPart === '(OPT_NATO)' || fractionPart === '(OPT_NATO_T)' ? 'BLUFOR' : 'OPFOR';
|
||||||
|
const name = nameAndFractionString.substring(0, nameAndFractionString.indexOf(fractionPart) - 1);
|
||||||
|
|
||||||
let vehicleClass;
|
return {name: name, fraction: fraction};
|
||||||
for (const key in VehicleClasses) {
|
|
||||||
if (VehicleClasses.hasOwnProperty(key) && VehicleClasses[key] === vehicleClassString) {
|
|
||||||
vehicleClass = key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: vehicleName,
|
|
||||||
fraction: fraction,
|
|
||||||
vehicleClass: vehicleClass,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const transformMoneyString = (budgetString) => {
|
const transformMoneyString = (budgetString) => {
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<button (click)="scrollToTop()" *ngIf="scrollTopVisible" id="scrollTopBtn" title="Zum Seitenanfang">△</button>
|
<button (click)="scrollToTop()" *ngIf="scrollTopVisible" id="scrollTopBtn" title="Scroll to top">△</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,7 @@ export interface Player {
|
||||||
name?: string;
|
name?: string;
|
||||||
warId?: War;
|
warId?: War;
|
||||||
kill?: number;
|
kill?: number;
|
||||||
vehicleLight?: number;
|
vehicle?: number;
|
||||||
vehicleHeavy?: number;
|
|
||||||
vehicleAir?: number;
|
|
||||||
death?: number;
|
death?: number;
|
||||||
friendlyFire?: number;
|
friendlyFire?: number;
|
||||||
revive?: number;
|
revive?: number;
|
||||||
|
|
|
@ -81,6 +81,26 @@
|
||||||
</ngx-charts-line-chart>
|
</ngx-charts-line-chart>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="chart-container">
|
||||||
|
<ngx-charts-line-chart
|
||||||
|
[results]="vehicleKillData"
|
||||||
|
[showRefLines]="showRefLines"
|
||||||
|
[showRefLabels]="showRefLabels"
|
||||||
|
[referenceLines]="killRefLines"
|
||||||
|
[scheme]="colorScheme"
|
||||||
|
[gradient]="gradient"
|
||||||
|
[xAxis]="xAxis"
|
||||||
|
[yAxis]="yAxis"
|
||||||
|
[legend]="legend"
|
||||||
|
[showXAxisLabel]="showXAxisLabel"
|
||||||
|
[showYAxisLabel]="showYAxisLabel"
|
||||||
|
[yAxisLabel]="yAxisVehicleKill"
|
||||||
|
[autoScale]="autoscale"
|
||||||
|
[timeline]="timeline"
|
||||||
|
[roundDomains]="roundDomains">
|
||||||
|
</ngx-charts-line-chart>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="chart-container">
|
<div class="chart-container">
|
||||||
<ngx-charts-line-chart
|
<ngx-charts-line-chart
|
||||||
[results]="deathData"
|
[results]="deathData"
|
||||||
|
@ -160,65 +180,5 @@
|
||||||
[roundDomains]="roundDomains">
|
[roundDomains]="roundDomains">
|
||||||
</ngx-charts-line-chart>
|
</ngx-charts-line-chart>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chart-container">
|
|
||||||
<ngx-charts-line-chart
|
|
||||||
[results]="vehicleLightData"
|
|
||||||
[showRefLines]="showRefLines"
|
|
||||||
[showRefLabels]="showRefLabels"
|
|
||||||
[referenceLines]="killRefLines"
|
|
||||||
[scheme]="colorScheme"
|
|
||||||
[gradient]="gradient"
|
|
||||||
[xAxis]="xAxis"
|
|
||||||
[yAxis]="yAxis"
|
|
||||||
[legend]="legend"
|
|
||||||
[showXAxisLabel]="showXAxisLabel"
|
|
||||||
[showYAxisLabel]="showYAxisLabel"
|
|
||||||
[yAxisLabel]="yAxisVehicleLight"
|
|
||||||
[autoScale]="autoscale"
|
|
||||||
[timeline]="timeline"
|
|
||||||
[roundDomains]="roundDomains">
|
|
||||||
</ngx-charts-line-chart>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="chart-container">
|
|
||||||
<ngx-charts-line-chart
|
|
||||||
[results]="vehicleHeavyData"
|
|
||||||
[showRefLines]="showRefLines"
|
|
||||||
[showRefLabels]="showRefLabels"
|
|
||||||
[referenceLines]="killRefLines"
|
|
||||||
[scheme]="colorScheme"
|
|
||||||
[gradient]="gradient"
|
|
||||||
[xAxis]="xAxis"
|
|
||||||
[yAxis]="yAxis"
|
|
||||||
[legend]="legend"
|
|
||||||
[showXAxisLabel]="showXAxisLabel"
|
|
||||||
[showYAxisLabel]="showYAxisLabel"
|
|
||||||
[yAxisLabel]="yAxisVehicleHeavy"
|
|
||||||
[autoScale]="autoscale"
|
|
||||||
[timeline]="timeline"
|
|
||||||
[roundDomains]="roundDomains">
|
|
||||||
</ngx-charts-line-chart>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="chart-container">
|
|
||||||
<ngx-charts-line-chart
|
|
||||||
[results]="vehicleAirData"
|
|
||||||
[showRefLines]="showRefLines"
|
|
||||||
[showRefLabels]="showRefLabels"
|
|
||||||
[referenceLines]="killRefLines"
|
|
||||||
[scheme]="colorScheme"
|
|
||||||
[gradient]="gradient"
|
|
||||||
[xAxis]="xAxis"
|
|
||||||
[yAxis]="yAxis"
|
|
||||||
[legend]="legend"
|
|
||||||
[showXAxisLabel]="showXAxisLabel"
|
|
||||||
[showYAxisLabel]="showYAxisLabel"
|
|
||||||
[yAxisLabel]="yAxisVehicleAir"
|
|
||||||
[autoScale]="autoscale"
|
|
||||||
[timeline]="timeline"
|
|
||||||
[roundDomains]="roundDomains">
|
|
||||||
</ngx-charts-line-chart>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,9 +23,7 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
sumData: any[] = [];
|
sumData: any[] = [];
|
||||||
killData: any[] = [];
|
killData: any[] = [];
|
||||||
friendlyFireData: any[] = [];
|
friendlyFireData: any[] = [];
|
||||||
vehicleLightData: any[] = [];
|
vehicleKillData: any[] = [];
|
||||||
vehicleHeavyData: any[] = [];
|
|
||||||
vehicleAirData: any[] = [];
|
|
||||||
deathData: any[] = [];
|
deathData: any[] = [];
|
||||||
respawnData: any[] = [];
|
respawnData: any[] = [];
|
||||||
reviveData: any[] = [];
|
reviveData: any[] = [];
|
||||||
|
@ -33,9 +31,7 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
|
|
||||||
yAxisKill = 'Kills';
|
yAxisKill = 'Kills';
|
||||||
yAxisFriendlyFire = 'FriendlyFire';
|
yAxisFriendlyFire = 'FriendlyFire';
|
||||||
yAxisVehicleLight = 'Fahrzeug (Light)';
|
yAxisVehicleKill = 'Fahrzeug-Kills';
|
||||||
yAxisVehicleHeavy = 'Fahrzeug (Heavy)';
|
|
||||||
yAxisVehicleAir = 'Fahrzeug (Air)';
|
|
||||||
yAxisDeath = 'Tode';
|
yAxisDeath = 'Tode';
|
||||||
yAxisRespawn = 'Respawn';
|
yAxisRespawn = 'Respawn';
|
||||||
yAxisRevive = 'Revive';
|
yAxisRevive = 'Revive';
|
||||||
|
@ -53,9 +49,7 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
showRefLines = true;
|
showRefLines = true;
|
||||||
showRefLabels = true;
|
showRefLabels = true;
|
||||||
killRefLines = [];
|
killRefLines = [];
|
||||||
vehicleLightRefLines = [];
|
vehicleKillRefLines = [];
|
||||||
vehicleHeavyRefLines = [];
|
|
||||||
vehicleAirRefLines = [];
|
|
||||||
deathRefLines = [];
|
deathRefLines = [];
|
||||||
captureRefLines = [];
|
captureRefLines = [];
|
||||||
friendlyFireRefLines = [];
|
friendlyFireRefLines = [];
|
||||||
|
@ -74,9 +68,7 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
|
|
||||||
totalKills;
|
totalKills;
|
||||||
totalFriendlyFire;
|
totalFriendlyFire;
|
||||||
totalVehicleLight;
|
totalVehicleKills;
|
||||||
totalVehicleHeavy;
|
|
||||||
totalVehicleAir;
|
|
||||||
totalDeath;
|
totalDeath;
|
||||||
totalRespawn;
|
totalRespawn;
|
||||||
totalRevive;
|
totalRevive;
|
||||||
|
@ -97,14 +89,12 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
.subscribe(campaignPlayer => {
|
.subscribe(campaignPlayer => {
|
||||||
this.campaignPlayer = campaignPlayer;
|
this.campaignPlayer = campaignPlayer;
|
||||||
this.killData = this.assignData(this.yAxisKill, 'kill');
|
this.killData = this.assignData(this.yAxisKill, 'kill');
|
||||||
|
this.vehicleKillData = this.assignData(this.yAxisVehicleKill, 'vehicle');
|
||||||
this.friendlyFireData = this.assignData(this.yAxisFriendlyFire, 'friendlyFire');
|
this.friendlyFireData = this.assignData(this.yAxisFriendlyFire, 'friendlyFire');
|
||||||
this.deathData = this.assignData(this.yAxisDeath, 'death');
|
this.deathData = this.assignData(this.yAxisDeath, 'death');
|
||||||
this.respawnData = this.assignData(this.yAxisRespawn, 'respawn');
|
this.respawnData = this.assignData(this.yAxisRespawn, 'respawn');
|
||||||
this.reviveData = this.assignData(this.yAxisRevive, 'revive');
|
this.reviveData = this.assignData(this.yAxisRevive, 'revive');
|
||||||
this.captureData = this.assignData(this.yAxisCapture, 'flagTouch');
|
this.captureData = this.assignData(this.yAxisCapture, 'flagTouch');
|
||||||
this.vehicleLightData = this.assignData(this.yAxisVehicleLight, 'vehicleLight');
|
|
||||||
this.vehicleHeavyData = this.assignData(this.yAxisVehicleHeavy, 'vehicleHeavy');
|
|
||||||
this.vehicleAirData = this.assignData(this.yAxisVehicleAir, 'vehicleAir');
|
|
||||||
|
|
||||||
const totalDeathDiv = this.totalDeath === 0 ? 1 : this.totalDeath;
|
const totalDeathDiv = this.totalDeath === 0 ? 1 : this.totalDeath;
|
||||||
this.kdRatio = parseFloat((this.totalKills / totalDeathDiv).toFixed(2));
|
this.kdRatio = parseFloat((this.totalKills / totalDeathDiv).toFixed(2));
|
||||||
|
@ -123,6 +113,10 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
name: this.yAxisFriendlyFire,
|
name: this.yAxisFriendlyFire,
|
||||||
value: this.totalFriendlyFire
|
value: this.totalFriendlyFire
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: this.yAxisVehicleKill,
|
||||||
|
value: this.totalVehicleKills
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: this.yAxisDeath,
|
name: this.yAxisDeath,
|
||||||
value: this.totalDeath
|
value: this.totalDeath
|
||||||
|
@ -138,24 +132,11 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
{
|
{
|
||||||
name: this.yAxisCapture,
|
name: this.yAxisCapture,
|
||||||
value: this.totalCapture
|
value: this.totalCapture
|
||||||
},
|
}
|
||||||
{
|
|
||||||
name: this.yAxisVehicleLight,
|
|
||||||
value: this.totalVehicleLight
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: this.yAxisVehicleHeavy,
|
|
||||||
value: this.totalVehicleHeavy
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: this.yAxisVehicleAir,
|
|
||||||
value: this.totalVehicleAir
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
Object.assign(this, [this.sumData, this.killData, this.friendlyFireData, this.vehicleLightData,
|
Object.assign(this, [this.sumData, this.killData, this.friendlyFireData, this.vehicleKillData,
|
||||||
this.vehicleHeavyData, this.vehicleAirData, this.deathData, this.respawnData, this.reviveData,
|
this.deathData, this.respawnData, this.reviveData, this.captureData]);
|
||||||
this.captureData]);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,6 +165,10 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
this.friendlyFireRefLines.push({value: total / playerLength, name: this.avgLabel});
|
this.friendlyFireRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||||
this.totalFriendlyFire = total;
|
this.totalFriendlyFire = total;
|
||||||
break;
|
break;
|
||||||
|
case 'vehicle':
|
||||||
|
this.vehicleKillRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||||
|
this.totalVehicleKills = total;
|
||||||
|
break;
|
||||||
case 'death':
|
case 'death':
|
||||||
this.deathRefLines.push({value: total / playerLength, name: this.avgLabel});
|
this.deathRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||||
this.totalDeath = total;
|
this.totalDeath = total;
|
||||||
|
@ -200,18 +185,6 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
this.captureRefLines.push({value: total / playerLength, name: this.avgLabel});
|
this.captureRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||||
this.totalCapture = total;
|
this.totalCapture = total;
|
||||||
break;
|
break;
|
||||||
case 'vehicleLight':
|
|
||||||
this.vehicleLightRefLines.push({value: total / playerLength, name: this.avgLabel});
|
|
||||||
this.totalVehicleLight = total;
|
|
||||||
break;
|
|
||||||
case 'vehicleHeavy':
|
|
||||||
this.vehicleHeavyRefLines.push({value: total / playerLength, name: this.avgLabel});
|
|
||||||
this.totalVehicleHeavy = total;
|
|
||||||
break;
|
|
||||||
case 'vehicleAir':
|
|
||||||
this.vehicleAirRefLines.push({value: total / playerLength, name: this.avgLabel});
|
|
||||||
this.totalVehicleAir = total;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return [killObj];
|
return [killObj];
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,27 @@
|
||||||
<ngx-datatable-column [width]="valueColWidth" name="FriendlyFire" prop="friendlyFire"></ngx-datatable-column>
|
<ngx-datatable-column [width]="valueColWidth" name="FriendlyFire" prop="friendlyFire"></ngx-datatable-column>
|
||||||
</ngx-datatable>
|
</ngx-datatable>
|
||||||
|
|
||||||
|
<ngx-datatable
|
||||||
|
[rows]="players.vehicle"
|
||||||
|
[messages]="emptyMessage"
|
||||||
|
[headerHeight]="cellHeight"
|
||||||
|
[rowHeight]="cellHeight"
|
||||||
|
[cssClasses]='customClasses'
|
||||||
|
[columnMode]="'force'"
|
||||||
|
[scrollbarV]="true"
|
||||||
|
[selectionType]="'single'">
|
||||||
|
<ngx-datatable-column [width]="numberColWidth" name="#" prop="num"></ngx-datatable-column>
|
||||||
|
<ngx-datatable-column name="Spieler" prop="name" [width]="nameColWidth" style="padding-left:10px">
|
||||||
|
<ng-template ngx-datatable-cell-template let-row="row" let-value="value">
|
||||||
|
<span class="player-name"
|
||||||
|
[style.color]="row['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
||||||
|
{{value}}
|
||||||
|
</span>
|
||||||
|
</ng-template>
|
||||||
|
</ngx-datatable-column>
|
||||||
|
<ngx-datatable-column [width]="valueColWidth" name="FahrzeugKill" prop="vehicle"></ngx-datatable-column>
|
||||||
|
</ngx-datatable>
|
||||||
|
|
||||||
<ngx-datatable
|
<ngx-datatable
|
||||||
[rows]="players.death"
|
[rows]="players.death"
|
||||||
[messages]="emptyMessage"
|
[messages]="emptyMessage"
|
||||||
|
@ -141,68 +162,5 @@
|
||||||
<ngx-datatable-column [width]="valueColWidth" name="Eroberung" prop="flagTouch"></ngx-datatable-column>
|
<ngx-datatable-column [width]="valueColWidth" name="Eroberung" prop="flagTouch"></ngx-datatable-column>
|
||||||
</ngx-datatable>
|
</ngx-datatable>
|
||||||
|
|
||||||
<ngx-datatable
|
|
||||||
[rows]="players.vehicleLight"
|
|
||||||
[messages]="emptyMessage"
|
|
||||||
[headerHeight]="cellHeight"
|
|
||||||
[rowHeight]="cellHeight"
|
|
||||||
[cssClasses]='customClasses'
|
|
||||||
[columnMode]="'force'"
|
|
||||||
[scrollbarV]="true"
|
|
||||||
[selectionType]="'single'">
|
|
||||||
<ngx-datatable-column [width]="numberColWidth" name="#" prop="num"></ngx-datatable-column>
|
|
||||||
<ngx-datatable-column name="Spieler" prop="name" [width]="nameColWidth" style="padding-left:10px">
|
|
||||||
<ng-template ngx-datatable-cell-template let-row="row" let-value="value">
|
|
||||||
<span class="player-name"
|
|
||||||
[style.color]="row['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
|
||||||
{{value}}
|
|
||||||
</span>
|
|
||||||
</ng-template>
|
|
||||||
</ngx-datatable-column>
|
|
||||||
<ngx-datatable-column [width]="valueColWidth" name="Fzg (Light)" prop="vehicleLight"></ngx-datatable-column>
|
|
||||||
</ngx-datatable>
|
|
||||||
|
|
||||||
<ngx-datatable
|
|
||||||
[rows]="players.vehicleHeavy"
|
|
||||||
[messages]="emptyMessage"
|
|
||||||
[headerHeight]="cellHeight"
|
|
||||||
[rowHeight]="cellHeight"
|
|
||||||
[cssClasses]='customClasses'
|
|
||||||
[columnMode]="'force'"
|
|
||||||
[scrollbarV]="true"
|
|
||||||
[selectionType]="'single'">
|
|
||||||
<ngx-datatable-column [width]="numberColWidth" name="#" prop="num"></ngx-datatable-column>
|
|
||||||
<ngx-datatable-column name="Spieler" prop="name" [width]="nameColWidth" style="padding-left:10px">
|
|
||||||
<ng-template ngx-datatable-cell-template let-row="row" let-value="value">
|
|
||||||
<span class="player-name"
|
|
||||||
[style.color]="row['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
|
||||||
{{value}}
|
|
||||||
</span>
|
|
||||||
</ng-template>
|
|
||||||
</ngx-datatable-column>
|
|
||||||
<ngx-datatable-column [width]="valueColWidth" name="Fzg (Heavy)" prop="vehicleHeavy"></ngx-datatable-column>
|
|
||||||
</ngx-datatable>
|
|
||||||
|
|
||||||
<ngx-datatable
|
|
||||||
[rows]="players.vehicleAir"
|
|
||||||
[messages]="emptyMessage"
|
|
||||||
[headerHeight]="cellHeight"
|
|
||||||
[rowHeight]="cellHeight"
|
|
||||||
[cssClasses]='customClasses'
|
|
||||||
[columnMode]="'force'"
|
|
||||||
[scrollbarV]="true"
|
|
||||||
[selectionType]="'single'">
|
|
||||||
<ngx-datatable-column [width]="numberColWidth" name="#" prop="num"></ngx-datatable-column>
|
|
||||||
<ngx-datatable-column name="Spieler" prop="name" [width]="nameColWidth" style="padding-left:10px">
|
|
||||||
<ng-template ngx-datatable-cell-template let-row="row" let-value="value">
|
|
||||||
<span class="player-name"
|
|
||||||
[style.color]="row['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
|
|
||||||
{{value}}
|
|
||||||
</span>
|
|
||||||
</ng-template>
|
|
||||||
</ngx-datatable-column>
|
|
||||||
<ngx-datatable-column [width]="valueColWidth" name="Fzg (Air)" prop="vehicleAir"></ngx-datatable-column>
|
|
||||||
</ngx-datatable>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -87,9 +87,7 @@ export class StatisticHighScoreComponent implements OnInit {
|
||||||
this.players = {
|
this.players = {
|
||||||
kill: this.filterPlayerAttribute('kill'),
|
kill: this.filterPlayerAttribute('kill'),
|
||||||
friendlyFire: this.filterPlayerAttribute('friendlyFire'),
|
friendlyFire: this.filterPlayerAttribute('friendlyFire'),
|
||||||
vehicleLight: this.filterPlayerAttribute('vehicleLight'),
|
vehicle: this.filterPlayerAttribute('vehicle'),
|
||||||
vehicleHeavy: this.filterPlayerAttribute('vehicleLight'),
|
|
||||||
vehicleAir: this.filterPlayerAttribute('vehicleLight'),
|
|
||||||
death: this.filterPlayerAttribute('death'),
|
death: this.filterPlayerAttribute('death'),
|
||||||
respawn: this.filterPlayerAttribute('respawn'),
|
respawn: this.filterPlayerAttribute('respawn'),
|
||||||
revive: this.filterPlayerAttribute('revive'),
|
revive: this.filterPlayerAttribute('revive'),
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
/* ########### DATATABLE ########### */
|
/* ########### DATATABLE ########### */
|
||||||
|
|
||||||
ngx-datatable {
|
ngx-datatable {
|
||||||
width: 1040px;
|
width: 1020px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
height: 68vh;
|
height: 68vh;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,15 +23,13 @@
|
||||||
{{value === 'BLUFOR' ? fraction.BLUFOR : fraction.OPFOR}}
|
{{value === 'BLUFOR' ? fraction.BLUFOR : fraction.OPFOR}}
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngx-datatable-column>
|
</ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[2]}}" prop="kill"></ngx-datatable-column>
|
<ngx-datatable-column [width]="90" name="{{tableHead[2]}}" prop="kill"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[3]}}" prop="friendlyFire"></ngx-datatable-column>
|
<ngx-datatable-column [width]="104" name="{{tableHead[3]}}" prop="friendlyFire"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[4]}}" prop="vehicleLight"></ngx-datatable-column>
|
<ngx-datatable-column [width]="90" name="{{tableHead[4]}}" prop="vehicle"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[5]}}" prop="vehicleHeavy"></ngx-datatable-column>
|
<ngx-datatable-column [width]="80" name="{{tableHead[5]}}" prop="revive"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[6]}}" prop="vehicleAir"></ngx-datatable-column>
|
<ngx-datatable-column [width]="100" name="{{tableHead[6]}}" prop="flagTouch"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[7]}}" prop="revive"></ngx-datatable-column>
|
<ngx-datatable-column [width]="70" name="{{tableHead[7]}}" prop="death"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[8]}}" prop="flagTouch"></ngx-datatable-column>
|
<ngx-datatable-column [width]="90" name="{{tableHead[8]}}" prop="respawn"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[9]}}" prop="death"></ngx-datatable-column>
|
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[10]}}" prop="respawn"></ngx-datatable-column>
|
|
||||||
<!--<ngx-datatable-column [width]="80" name="" prop="name">-->
|
<!--<ngx-datatable-column [width]="80" name="" prop="name">-->
|
||||||
<!--<ng-template ngx-datatable-cell-template let-value="value">-->
|
<!--<ng-template ngx-datatable-cell-template let-value="value">-->
|
||||||
<!--<span class="btn btn-sm btn-default in-table-btn disabled">Detail</span>-->
|
<!--<span class="btn btn-sm btn-default in-table-btn disabled">Detail</span>-->
|
||||||
|
|
|
@ -19,8 +19,7 @@ export class ScoreboardComponent implements OnChanges {
|
||||||
|
|
||||||
@Output() playerTabSwitch = new EventEmitter();
|
@Output() playerTabSwitch = new EventEmitter();
|
||||||
|
|
||||||
tableHead = ['Spieler', 'Fraktion', 'Kills', 'FF', 'Fzg(L)', 'Fzg(H)', 'Fzg(A)',
|
tableHead = ['Spieler', 'Fraktion', 'Kills', 'FriendlyFire', 'Fahrzeug', 'Revive', 'Eroberung', 'Tod', 'Respawn'];
|
||||||
'Revive', 'Flagge', 'Tod', 'Respawn'];
|
|
||||||
|
|
||||||
isSteamUUID = PlayerUtils.isSteamUUID;
|
isSteamUUID = PlayerUtils.isSteamUUID;
|
||||||
|
|
||||||
|
@ -83,9 +82,7 @@ export class ScoreboardComponent implements OnChanges {
|
||||||
csvOut += player.fraction + ',';
|
csvOut += player.fraction + ',';
|
||||||
csvOut += player.kill + ',';
|
csvOut += player.kill + ',';
|
||||||
csvOut += player.friendlyFire + ',';
|
csvOut += player.friendlyFire + ',';
|
||||||
csvOut += player.vehicleLight + ',';
|
csvOut += player.vehicle + ',';
|
||||||
csvOut += player.vehicleHeavy + ',';
|
|
||||||
csvOut += player.vehicleAir + ',';
|
|
||||||
csvOut += player.revive + ',';
|
csvOut += player.revive + ',';
|
||||||
csvOut += player.flagTouch + ',';
|
csvOut += player.flagTouch + ',';
|
||||||
csvOut += player.death + ',';
|
csvOut += player.death + ',';
|
||||||
|
|
Loading…
Reference in New Issue