Skip to content

Commit

Permalink
Include anubis in images.
Browse files Browse the repository at this point in the history
Update playerstats to match based on team string if team id does not exist.
  • Loading branch information
PhlexPlexico committed May 7, 2024
1 parent 7e5df69 commit 3d543ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Binary file added public/img/maps/de_anubis.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 18 additions & 8 deletions src/components/PlayerStatTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,10 @@ export default {
if (typeof serverResponse == "string") return;
let allMapIds = [];
let totalMatchTeam = [];
let allTeamIds = [];
let allTeamNames = [];

Check failure on line 254 in src/components/PlayerStatTable.vue

View workflow job for this annotation

GitHub Actions / g5v:latest

'allTeamNames' is assigned a value but never used
serverResponse.filter(item => {
let i = allMapIds.findIndex(x => x == item.map_id);
let j = allTeamIds.findIndex(x => x == item.team_id);
if (i <= -1) allMapIds.push(item.map_id);
if (j <= -1) allTeamIds.push(item.team_id);
return null;
});
allMapIds.forEach(map_id => {
Expand Down Expand Up @@ -284,11 +282,23 @@ export default {
let hsp = this.GetHSP(player);
let kdr = this.GetKDR(player);
let fpr = this.GetFPR(player);
let teamNum = player.team_id == matchData.team1_id ? 1 : 2;
let newName =
player.team_id == matchData.team1_id
? matchData.team1_string
: matchData.team2_string;
let teamNum;
let newName;
if (player.team_id) {
teamNum = player.team_id == matchData.team1_id ? 1 : 2;
newName =
player.team_id == matchData.team1_id
? matchData.team1_string
: matchData.team2_string;
} else {
// If we don't have a team ID, we must be pugging. Go based on
// Team strings alone.
teamNum = player.team_name == matchData.team1_string ? 1 : 2;
newName =
player.team_name == matchData.team1_string
? matchData.team1_string
: matchData.team2_string;
}
this.$set(
this.playerstats[idx][pIdx],
"Team",
Expand Down

0 comments on commit 3d543ad

Please sign in to comment.