diff --git a/api/tools/log-parse-tool.js b/api/tools/log-parse-tool.js
index af622d2..91748f1 100644
--- a/api/tools/log-parse-tool.js
+++ b/api/tools/log-parse-tool.js
@@ -5,6 +5,7 @@ const playerArrayContains = require('./util').playerArrayContains;
const WHITESPACE = ' ';
const parseWarLog = (lineArray, war) => {
+
const NAME_TOO_LONG_ERROR = 'Error: ENAMETOOLONG: name too long, open \'';
const stats = {
@@ -21,6 +22,8 @@ const parseWarLog = (lineArray, war) => {
players: []
};
+ const vehicleBlacklist = ['Prowler (Unbewaffnet)', 'Qilin (Unbewaffnet)', 'Quad Bike', 'HuntIR'];
+
const addPlayerIfNotExists = (inputPlayer, steamUUID) => {
const player = getPlayerAndFractionFromString(inputPlayer);
if (player && player.name && player.fraction && !playerArrayContains(stats.players, player)) {
@@ -39,16 +42,16 @@ const parseWarLog = (lineArray, war) => {
}
/**
- * KILLS
+ * KILLS & VEHICLE KILLS
*/
if (line.includes('(Abschuss)')) {
stats.clean.push(line);
const shooterString = line.substring(line.lastIndexOf(' von: ') + 6, line.lastIndexOf('."'));
const shooter = getPlayerAndFractionFromString(shooterString);
- const targetString = line.substring(line.lastIndexOf(' --- ') + 5, line.lastIndexOf(' von:'));
- if (line.includes('Fahrzeug')) {
+ if (line.includes('Fahrzeug:')) {
+ const targetString = line.substring(line.lastIndexOf(' --- Fahrzeug: ') + 15, line.lastIndexOf(' von:'));
const target = getVehicleAndFractionFromString(targetString);
if (target && shooter && target.fraction !== shooter.fraction) {
stats.vehicles.push({
@@ -60,6 +63,7 @@ const parseWarLog = (lineArray, war) => {
})
}
} else {
+ const targetString = line.substring(line.lastIndexOf(' --- ') + 5, line.lastIndexOf(' von:'));
const target = getPlayerAndFractionFromString(targetString);
stats.kills.push({
war: war._id,
@@ -196,7 +200,7 @@ const parseWarLog = (lineArray, war) => {
const playerName = stats.players[i].name;
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]['vehicle'] = stats.vehicles.filter(vehicle => vehicle.shooter === playerName).length;
+ stats.players[i]['vehicle'] = stats.vehicles.filter(vehicle => vehicle.shooter === playerName && vehicleBlacklist.indexOf(vehicle.target) < 0).length;
stats.players[i]['friendlyFire'] = stats.kills.filter(kill => kill.shooter === playerName && kill.friendlyFire).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;
diff --git a/static/src/app/models/model-interfaces.ts b/static/src/app/models/model-interfaces.ts
index fce11f6..58b91e8 100644
--- a/static/src/app/models/model-interfaces.ts
+++ b/static/src/app/models/model-interfaces.ts
@@ -24,6 +24,7 @@ export interface Player {
name?: string;
warId?: War;
kill?: number;
+ vehicle?: number;
death?: number;
friendlyFire?: number;
revive?: number;
diff --git a/static/src/app/statistic/war-detail/scoreboard/scoreboard.component.html b/static/src/app/statistic/war-detail/scoreboard/scoreboard.component.html
index 2ceebb8..167bba9 100644
--- a/static/src/app/statistic/war-detail/scoreboard/scoreboard.component.html
+++ b/static/src/app/statistic/war-detail/scoreboard/scoreboard.component.html
@@ -25,15 +25,16 @@
+
-
-
- Detail
-
-
+
+
+
+
+
Gesamt
diff --git a/static/src/app/statistic/war-detail/war-detail.component.css b/static/src/app/statistic/war-detail/war-detail.component.css
index 0791e30..9e60f76 100644
--- a/static/src/app/statistic/war-detail/war-detail.component.css
+++ b/static/src/app/statistic/war-detail/war-detail.component.css
@@ -1,21 +1,3 @@
-.war-header {
- position: fixed;
- left: 35%;
- border-bottom: thin solid lightgrey;
-}
-
-@media only screen and (max-width: 1950px) {
- .war-header {
- left: 30%;
- }
-}
-
-@media only screen and (max-width: 1500px) {
- .war-header {
- left: 380px;
- }
-}
-
.war-header-container {
width: 920px;
min-height: 168px;
@@ -28,6 +10,10 @@
margin-bottom: 10px;
}
+.war-header {
+ border-bottom: thin solid lightgrey;
+}
+
.nav-tabs > li.active > a {
background: #222222;
}