add vehicle class kills to highscore and player details
parent
9767e1bf25
commit
5e8a2b4db2
|
@ -46,7 +46,9 @@ campaignPlayer.route('/ranking/:campaignId')
|
|||
const resItem = {
|
||||
name: usesUUID ? playerInstances[playerInstances.length - 1].name : player,
|
||||
kill: 0,
|
||||
vehicle: 0,
|
||||
vehicleLight: 0,
|
||||
vehicleHeavy: 0,
|
||||
vehicleAir: 0,
|
||||
death: 0,
|
||||
friendlyFire: 0,
|
||||
revive: 0,
|
||||
|
@ -57,7 +59,9 @@ campaignPlayer.route('/ranking/:campaignId')
|
|||
resItem.kill += playerInstances[i].kill;
|
||||
resItem.death += playerInstances[i].death;
|
||||
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.respawn += playerInstances[i].respawn;
|
||||
resItem.flagTouch += playerInstances[i].flagTouch;
|
||||
|
@ -80,7 +84,9 @@ campaignPlayer.route('/ranking/:campaignId')
|
|||
kill: getSortedField('kill'),
|
||||
death: getSortedField('death'),
|
||||
friendlyFire: getSortedField('friendlyFire'),
|
||||
vehicle: getSortedField('vehicle'),
|
||||
vehicleLight: getSortedField('vehicleLight'),
|
||||
vehicleHeavy: getSortedField('vehicleHeavy'),
|
||||
vehicleAir: getSortedField('vehicleAir'),
|
||||
revive: getSortedField('revive'),
|
||||
respawn: getSortedField('respawn'),
|
||||
flagTouch: getSortedField('flagTouch'),
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
|
||||
<div class="chart-container">
|
||||
<ngx-charts-line-chart
|
||||
[results]="vehicleKillData"
|
||||
[results]="vehicleLightData"
|
||||
[showRefLines]="showRefLines"
|
||||
[showRefLabels]="showRefLabels"
|
||||
[referenceLines]="killRefLines"
|
||||
|
@ -94,7 +94,47 @@
|
|||
[legend]="legend"
|
||||
[showXAxisLabel]="showXAxisLabel"
|
||||
[showYAxisLabel]="showYAxisLabel"
|
||||
[yAxisLabel]="yAxisVehicleKill"
|
||||
[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">
|
||||
|
|
|
@ -23,7 +23,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
sumData: any[] = [];
|
||||
killData: any[] = [];
|
||||
friendlyFireData: any[] = [];
|
||||
vehicleKillData: any[] = [];
|
||||
vehicleLightData: any[] = [];
|
||||
vehicleHeavyData: any[] = [];
|
||||
vehicleAirData: any[] = [];
|
||||
deathData: any[] = [];
|
||||
respawnData: any[] = [];
|
||||
reviveData: any[] = [];
|
||||
|
@ -31,7 +33,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
|
||||
yAxisKill = 'Kills';
|
||||
yAxisFriendlyFire = 'FriendlyFire';
|
||||
yAxisVehicleKill = 'Fahrzeug-Kills';
|
||||
yAxisVehicleLight = 'Fahrzeug (Leicht)';
|
||||
yAxisVehicleHeavy = 'Fahrzeug (Schwer)';
|
||||
yAxisVehicleAir = 'Fahrzeug (Luft)';
|
||||
yAxisDeath = 'Tode';
|
||||
yAxisRespawn = 'Respawn';
|
||||
yAxisRevive = 'Revive';
|
||||
|
@ -49,7 +53,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
showRefLines = true;
|
||||
showRefLabels = true;
|
||||
killRefLines = [];
|
||||
vehicleKillRefLines = [];
|
||||
vehicleLightRefLines = [];
|
||||
vehicleHeavyRefLines = [];
|
||||
vehicleAirRefLines = [];
|
||||
deathRefLines = [];
|
||||
captureRefLines = [];
|
||||
friendlyFireRefLines = [];
|
||||
|
@ -68,7 +74,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
|
||||
totalKills;
|
||||
totalFriendlyFire;
|
||||
totalVehicleKills;
|
||||
totalVehicleLight;
|
||||
totalVehicleHeavy;
|
||||
totalVehicleAir;
|
||||
totalDeath;
|
||||
totalRespawn;
|
||||
totalRevive;
|
||||
|
@ -89,7 +97,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
.subscribe(campaignPlayer => {
|
||||
this.campaignPlayer = campaignPlayer;
|
||||
this.killData = this.assignData(this.yAxisKill, 'kill');
|
||||
this.vehicleKillData = this.assignData(this.yAxisVehicleKill, 'vehicle');
|
||||
this.vehicleLightData = this.assignData(this.yAxisVehicleLight, 'vehicleLight');
|
||||
this.vehicleHeavyData = this.assignData(this.yAxisVehicleHeavy, 'vehicleHeavy');
|
||||
this.vehicleAirData = this.assignData(this.yAxisVehicleAir, 'vehicleAir');
|
||||
this.friendlyFireData = this.assignData(this.yAxisFriendlyFire, 'friendlyFire');
|
||||
this.deathData = this.assignData(this.yAxisDeath, 'death');
|
||||
this.respawnData = this.assignData(this.yAxisRespawn, 'respawn');
|
||||
|
@ -114,8 +124,16 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
value: this.totalFriendlyFire
|
||||
},
|
||||
{
|
||||
name: this.yAxisVehicleKill,
|
||||
value: this.totalVehicleKills
|
||||
name: this.yAxisVehicleLight,
|
||||
value: this.totalVehicleLight
|
||||
},
|
||||
{
|
||||
name: this.yAxisVehicleHeavy,
|
||||
value: this.totalVehicleHeavy
|
||||
},
|
||||
{
|
||||
name: this.yAxisVehicleAir,
|
||||
value: this.totalVehicleAir
|
||||
},
|
||||
{
|
||||
name: this.yAxisDeath,
|
||||
|
@ -135,8 +153,9 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
}
|
||||
];
|
||||
|
||||
Object.assign(this, [this.sumData, this.killData, this.friendlyFireData, this.vehicleKillData,
|
||||
this.deathData, this.respawnData, this.reviveData, this.captureData]);
|
||||
Object.assign(this, [this.sumData, this.killData, this.friendlyFireData, this.vehicleLightData,
|
||||
this.vehicleHeavyData, this.vehicleAirData, this.deathData, this.respawnData, this.reviveData,
|
||||
this.captureData]);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -165,9 +184,17 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
this.friendlyFireRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||
this.totalFriendlyFire = total;
|
||||
break;
|
||||
case 'vehicle':
|
||||
this.vehicleKillRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||
this.totalVehicleKills = total;
|
||||
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;
|
||||
case 'death':
|
||||
this.deathRefLines.push({value: total / playerLength, name: this.avgLabel});
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</ngx-datatable>
|
||||
|
||||
<ngx-datatable
|
||||
[rows]="players.vehicle"
|
||||
[rows]="players.vehicleLight"
|
||||
[messages]="emptyMessage"
|
||||
[headerHeight]="cellHeight"
|
||||
[rowHeight]="cellHeight"
|
||||
|
@ -75,7 +75,49 @@
|
|||
</span>
|
||||
</ng-template>
|
||||
</ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="valueColWidth" name="FahrzeugKill" prop="vehicle"></ngx-datatable-column>
|
||||
<ngx-datatable-column [width]="valueColWidth" name="Fahrzeug (Leicht)" 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="Fahrzeug (Schwer)" 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="Fahrzeug (Luft)" prop="vehicleAir"></ngx-datatable-column>
|
||||
</ngx-datatable>
|
||||
|
||||
<ngx-datatable
|
||||
|
|
|
@ -88,6 +88,8 @@ export class StatisticHighScoreComponent implements OnInit {
|
|||
kill: this.filterPlayerAttribute('kill'),
|
||||
friendlyFire: this.filterPlayerAttribute('friendlyFire'),
|
||||
vehicleLight: this.filterPlayerAttribute('vehicleLight'),
|
||||
vehicleHeavy: this.filterPlayerAttribute('vehicleLight'),
|
||||
vehicleAir: this.filterPlayerAttribute('vehicleLight'),
|
||||
death: this.filterPlayerAttribute('death'),
|
||||
respawn: this.filterPlayerAttribute('respawn'),
|
||||
revive: this.filterPlayerAttribute('revive'),
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* ########### DATATABLE ########### */
|
||||
|
||||
ngx-datatable {
|
||||
width: 1020px;
|
||||
width: 1030px;
|
||||
margin: auto;
|
||||
height: 68vh;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue