commit
f4917941a6
|
@ -15,8 +15,9 @@ Awarding associating a decoration to a user
|
||||||
|
|
||||||
|
|
||||||
# AwardingPopulated (Awarding)
|
# AwardingPopulated (Awarding)
|
||||||
Awarding with populated decoration and proposer
|
Awarding with populated decoration, proposer and army-user
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
+ proposer (Proposer, required) - app user who requested this awarding
|
+ proposer (Proposer, required) - app user who requested this awarding
|
||||||
+ decorationId (Decoration, required) - populated decoration object that is given with the awarding
|
+ decorationId (Decoration, required) - populated decoration object that is given with the awarding
|
||||||
|
+ userId (User, required) - populated user who gets this awarding
|
||||||
|
|
|
@ -77,3 +77,9 @@
|
||||||
+ `BLUFOR`
|
+ `BLUFOR`
|
||||||
+ `OPFOR`
|
+ `OPFOR`
|
||||||
+ `NONE`
|
+ `NONE`
|
||||||
|
+ vehicleClass: `LIGHT` (enum, required) - class of shot vehicle
|
||||||
|
+ Members
|
||||||
|
+ `LIGHT`
|
||||||
|
+ `HEAVY`
|
||||||
|
+ `AIR`
|
||||||
|
+ `UNKNOWN`
|
||||||
|
|
|
@ -7,7 +7,9 @@ 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
|
||||||
+ vehicle: 1 (number, required) - sum of vehicle kills
|
+ vehicleLight: 1 (number, required) - sum of light 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,7 +12,9 @@ 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
|
||||||
+ vehicle (array[HighscorePlayer],required) - player highscore for vehicle
|
+ vehicleLight (array[HighscorePlayer],required) - player highscore for light 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,6 +25,11 @@ 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,7 +24,19 @@ const PlayerSchema = new Schema({
|
||||||
set: (v) => Math.round(v),
|
set: (v) => Math.round(v),
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
vehicle: {
|
vehicleLight: {
|
||||||
|
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),
|
||||||
|
|
|
@ -33,7 +33,7 @@ awarding.route('/')
|
||||||
filter.confirmed = 0;
|
filter.confirmed = 0;
|
||||||
}
|
}
|
||||||
AwardingModel.find(filter, {}, {sort: {date: 'desc'}})
|
AwardingModel.find(filter, {}, {sort: {date: 'desc'}})
|
||||||
.populate('decorationId').populate('proposer', resultSet)
|
.populate('decorationId').populate('proposer', resultSet).populate('userId')
|
||||||
.exec((err, items) => {
|
.exec((err, items) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
err.status = codes.servererror;
|
err.status = codes.servererror;
|
||||||
|
|
|
@ -46,7 +46,9 @@ 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,
|
||||||
vehicle: 0,
|
vehicleLight: 0,
|
||||||
|
vehicleHeavy: 0,
|
||||||
|
vehicleAir: 0,
|
||||||
death: 0,
|
death: 0,
|
||||||
friendlyFire: 0,
|
friendlyFire: 0,
|
||||||
revive: 0,
|
revive: 0,
|
||||||
|
@ -57,7 +59,9 @@ 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.vehicle += playerInstances[i].vehicle;
|
resItem.vehicleLight += playerInstances[i].vehicleLight;
|
||||||
|
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;
|
||||||
|
@ -80,7 +84,9 @@ campaignPlayer.route('/ranking/:campaignId')
|
||||||
kill: getSortedField('kill'),
|
kill: getSortedField('kill'),
|
||||||
death: getSortedField('death'),
|
death: getSortedField('death'),
|
||||||
friendlyFire: getSortedField('friendlyFire'),
|
friendlyFire: getSortedField('friendlyFire'),
|
||||||
vehicle: getSortedField('vehicle'),
|
vehicleLight: getSortedField('vehicleLight'),
|
||||||
|
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,6 +4,13 @@ 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 \'';
|
||||||
|
|
||||||
|
@ -21,7 +28,7 @@ const parseWarLog = (lineArray, war) => {
|
||||||
players: [],
|
players: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
const vehicleBlacklist = [
|
const VEHICLE_BLACKLIST = [
|
||||||
'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',
|
||||||
|
@ -67,6 +74,7 @@ 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 {
|
||||||
|
@ -95,8 +103,8 @@ const parseWarLog = (lineArray, war) => {
|
||||||
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]);
|
||||||
} else if (line.includes('Endbudget')) {
|
} else if (line.includes('Endbudget')) {
|
||||||
stats.war['endBudgetBlufor'] = transformMoneyString(budg[9].substr(1));
|
stats.war['endBudgetBlufor'] = transformMoneyString(budg[9]);
|
||||||
stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0, -1));
|
stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0, -2));
|
||||||
stats.war.endDate = getFullTimeDate(war.date, budg[5]);
|
stats.war.endDate = getFullTimeDate(war.date, budg[5]);
|
||||||
} else {
|
} else {
|
||||||
stats.budget.push(getBudgetEntry(budg, war._id, war.date));
|
stats.budget.push(getBudgetEntry(budg, war._id, war.date));
|
||||||
|
@ -191,14 +199,31 @@ 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(
|
|
||||||
(vehicle) => vehicle.shooter === playerName && vehicleBlacklist.indexOf(vehicle.target) < 0).length;
|
// TODO: use vehicle class description from enum
|
||||||
|
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'];
|
||||||
}
|
}
|
||||||
|
@ -250,19 +275,34 @@ const getPlayerAndFractionFromString = (nameAndFractionString) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getVehicleAndFractionFromString = (nameAndFractionString) => {
|
const getVehicleAndFractionFromString = (nameClassFractionString) => {
|
||||||
const nameArray = nameAndFractionString.trim().split(WHITESPACE);
|
const nameArray = nameClassFractionString.trim().split(WHITESPACE);
|
||||||
const fractionPart = nameArray[nameArray.length - 1];
|
|
||||||
|
|
||||||
// escape it is some parachute fraction identifier
|
const vehicleFraction = nameArray[nameArray.length - 1];
|
||||||
if (fractionPart === 'OPF_F' || fractionPart === 'BLU_F') {
|
nameArray.pop();
|
||||||
|
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 = fractionPart === '(OPT_NATO)' || fractionPart === '(OPT_NATO_T)' ? 'BLUFOR' : 'OPFOR';
|
const fraction = vehicleFraction === '(OPT_NATO)' || vehicleFraction === '(OPT_NATO_T)' ? 'BLUFOR' : 'OPFOR';
|
||||||
const name = nameAndFractionString.substring(0, nameAndFractionString.indexOf(fractionPart) - 1);
|
|
||||||
|
|
||||||
return {name: name, fraction: fraction};
|
let vehicleClass;
|
||||||
|
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) => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "opt-cc",
|
"name": "opt-cc",
|
||||||
"version": "1.7.2",
|
"version": "1.7.3",
|
||||||
"author": "Florian Hartwich <hardi@noarch.de>",
|
"author": "Florian Hartwich <hardi@noarch.de>",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<button (click)="scrollToTop()" *ngIf="scrollTopVisible" id="scrollTopBtn" title="Scroll to top">△</button>
|
<button (click)="scrollToTop()" *ngIf="scrollTopVisible" id="scrollTopBtn" title="Zum Seitenanfang">△</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody {
|
tbody {
|
||||||
background: #ffffffe0;
|
background: rgba(255, 255, 255, 0.88);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell-outline {
|
.cell-outline {
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
.middle-row {
|
.middle-row {
|
||||||
min-height: 120px;
|
min-height: 120px;
|
||||||
border: rgb(34, 34, 34);
|
border: rgb(34, 34, 34);
|
||||||
background-color: #ffffffe0;
|
background-color: rgba(255, 255, 255, 0.88);
|
||||||
border-left-style: solid;
|
border-left-style: solid;
|
||||||
border-right-style: solid;
|
border-right-style: solid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,9 @@ export interface Player {
|
||||||
name?: string;
|
name?: string;
|
||||||
warId?: War;
|
warId?: War;
|
||||||
kill?: number;
|
kill?: number;
|
||||||
vehicle?: number;
|
vehicleLight?: number;
|
||||||
|
vehicleHeavy?: number;
|
||||||
|
vehicleAir?: number;
|
||||||
death?: number;
|
death?: number;
|
||||||
friendlyFire?: number;
|
friendlyFire?: number;
|
||||||
revive?: number;
|
revive?: number;
|
||||||
|
|
|
@ -81,26 +81,6 @@
|
||||||
</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"
|
||||||
|
@ -180,5 +160,65 @@
|
||||||
[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,7 +23,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
sumData: any[] = [];
|
sumData: any[] = [];
|
||||||
killData: any[] = [];
|
killData: any[] = [];
|
||||||
friendlyFireData: any[] = [];
|
friendlyFireData: any[] = [];
|
||||||
vehicleKillData: any[] = [];
|
vehicleLightData: any[] = [];
|
||||||
|
vehicleHeavyData: any[] = [];
|
||||||
|
vehicleAirData: any[] = [];
|
||||||
deathData: any[] = [];
|
deathData: any[] = [];
|
||||||
respawnData: any[] = [];
|
respawnData: any[] = [];
|
||||||
reviveData: any[] = [];
|
reviveData: any[] = [];
|
||||||
|
@ -31,7 +33,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
|
|
||||||
yAxisKill = 'Kills';
|
yAxisKill = 'Kills';
|
||||||
yAxisFriendlyFire = 'FriendlyFire';
|
yAxisFriendlyFire = 'FriendlyFire';
|
||||||
yAxisVehicleKill = 'Fahrzeug-Kills';
|
yAxisVehicleLight = 'Fahrzeug (Light)';
|
||||||
|
yAxisVehicleHeavy = 'Fahrzeug (Heavy)';
|
||||||
|
yAxisVehicleAir = 'Fahrzeug (Air)';
|
||||||
yAxisDeath = 'Tode';
|
yAxisDeath = 'Tode';
|
||||||
yAxisRespawn = 'Respawn';
|
yAxisRespawn = 'Respawn';
|
||||||
yAxisRevive = 'Revive';
|
yAxisRevive = 'Revive';
|
||||||
|
@ -49,7 +53,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
showRefLines = true;
|
showRefLines = true;
|
||||||
showRefLabels = true;
|
showRefLabels = true;
|
||||||
killRefLines = [];
|
killRefLines = [];
|
||||||
vehicleKillRefLines = [];
|
vehicleLightRefLines = [];
|
||||||
|
vehicleHeavyRefLines = [];
|
||||||
|
vehicleAirRefLines = [];
|
||||||
deathRefLines = [];
|
deathRefLines = [];
|
||||||
captureRefLines = [];
|
captureRefLines = [];
|
||||||
friendlyFireRefLines = [];
|
friendlyFireRefLines = [];
|
||||||
|
@ -68,7 +74,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
|
|
||||||
totalKills;
|
totalKills;
|
||||||
totalFriendlyFire;
|
totalFriendlyFire;
|
||||||
totalVehicleKills;
|
totalVehicleLight;
|
||||||
|
totalVehicleHeavy;
|
||||||
|
totalVehicleAir;
|
||||||
totalDeath;
|
totalDeath;
|
||||||
totalRespawn;
|
totalRespawn;
|
||||||
totalRevive;
|
totalRevive;
|
||||||
|
@ -89,12 +97,14 @@ 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));
|
||||||
|
@ -113,10 +123,6 @@ 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
|
||||||
|
@ -132,11 +138,24 @@ 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.vehicleKillData,
|
Object.assign(this, [this.sumData, this.killData, this.friendlyFireData, this.vehicleLightData,
|
||||||
this.deathData, this.respawnData, this.reviveData, this.captureData]);
|
this.vehicleHeavyData, this.vehicleAirData, this.deathData, this.respawnData, this.reviveData,
|
||||||
|
this.captureData]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,10 +184,6 @@ 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;
|
||||||
|
@ -185,6 +200,18 @@ 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,27 +57,6 @@
|
||||||
<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"
|
||||||
|
@ -162,5 +141,68 @@
|
||||||
<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,7 +87,9 @@ 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'),
|
||||||
vehicle: this.filterPlayerAttribute('vehicle'),
|
vehicleLight: this.filterPlayerAttribute('vehicleLight'),
|
||||||
|
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: 1020px;
|
width: 1040px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
height: 68vh;
|
height: 68vh;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,13 +23,15 @@
|
||||||
{{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]="90" name="{{tableHead[2]}}" prop="kill"></ngx-datatable-column>
|
<ngx-datatable-column [width]="70" name="{{tableHead[2]}}" prop="kill"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="104" name="{{tableHead[3]}}" prop="friendlyFire"></ngx-datatable-column>
|
<ngx-datatable-column [width]="70" name="{{tableHead[3]}}" prop="friendlyFire"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="90" name="{{tableHead[4]}}" prop="vehicle"></ngx-datatable-column>
|
<ngx-datatable-column [width]="70" name="{{tableHead[4]}}" prop="vehicleLight"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="80" name="{{tableHead[5]}}" prop="revive"></ngx-datatable-column>
|
<ngx-datatable-column [width]="70" name="{{tableHead[5]}}" prop="vehicleHeavy"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="100" name="{{tableHead[6]}}" prop="flagTouch"></ngx-datatable-column>
|
<ngx-datatable-column [width]="70" name="{{tableHead[6]}}" prop="vehicleAir"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="70" name="{{tableHead[7]}}" prop="death"></ngx-datatable-column>
|
<ngx-datatable-column [width]="70" name="{{tableHead[7]}}" prop="revive"></ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="90" name="{{tableHead[8]}}" prop="respawn"></ngx-datatable-column>
|
<ngx-datatable-column [width]="70" name="{{tableHead[8]}}" prop="flagTouch"></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,7 +19,8 @@ export class ScoreboardComponent implements OnChanges {
|
||||||
|
|
||||||
@Output() playerTabSwitch = new EventEmitter();
|
@Output() playerTabSwitch = new EventEmitter();
|
||||||
|
|
||||||
tableHead = ['Spieler', 'Fraktion', 'Kills', 'FriendlyFire', 'Fahrzeug', 'Revive', 'Eroberung', 'Tod', 'Respawn'];
|
tableHead = ['Spieler', 'Fraktion', 'Kills', 'FF', 'Fzg(L)', 'Fzg(H)', 'Fzg(A)',
|
||||||
|
'Revive', 'Flagge', 'Tod', 'Respawn'];
|
||||||
|
|
||||||
isSteamUUID = PlayerUtils.isSteamUUID;
|
isSteamUUID = PlayerUtils.isSteamUUID;
|
||||||
|
|
||||||
|
@ -82,7 +83,9 @@ 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.vehicle + ',';
|
csvOut += player.vehicleLight + ',';
|
||||||
|
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