Skip to content

Commit

Permalink
rename a couple of things
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhouweling committed Oct 22, 2024
1 parent f40e778 commit 5e32d75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/commands/stats/embeds/base-match-embed.mts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export abstract class BaseMatchEmbed<TCategory extends GameVariantCategory> {
["KDA", CoreStats.KDA.toString()],
["Headshot kills", CoreStats.HeadshotKills.toString()],
["Shots H:F", `${CoreStats.ShotsHit.toString()}:${CoreStats.ShotsFired.toString()}`],
["Accuracy", CoreStats.Accuracy.toString()],
["Accuracy", `${CoreStats.Accuracy.toString()}%`],
["Damage D:T", `${CoreStats.DamageDealt.toString()}:${CoreStats.DamageTaken.toString()}`],
["Av life duration", this.haloService.getReadableDuration(CoreStats.AverageLifeDuration)],
["Av damage/life", (CoreStats.DamageDealt / CoreStats.Deaths).toFixed(2)],
Expand Down
2 changes: 1 addition & 1 deletion src/commands/stats/stats.mts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class StatsCommand extends BaseCommand {
for (const seriesMatch of series) {
const gameTypeAndMap = await haloService.getGameTypeAndMap(seriesMatch);
const gameDuration = haloService.getReadableDuration(seriesMatch.MatchInfo.Duration);
const gameScore = haloService.getGameScore(seriesMatch);
const gameScore = haloService.getMatchScore(seriesMatch);

tableData.push([gameTypeAndMap, gameDuration, gameScore]);
}
Expand Down
6 changes: 3 additions & 3 deletions src/services/halo/halo.mts
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ export class HaloService {

async getGameTypeAndMap(match: MatchStats) {
const mapName = await this.getMapName(match);
return `${this.getGameVariant(match)}: ${mapName}`;
return `${this.getMatchVariant(match)}: ${mapName}`;
}

getGameScore(match: MatchStats) {
getMatchScore(match: MatchStats) {
const scoreCompare = match.Teams.map((team) => team.Stats.CoreStats.Score);

if (match.MatchInfo.GameVariantCategory === GameVariantCategory.MultiplayerOddball) {
Expand Down Expand Up @@ -179,7 +179,7 @@ export class HaloService {
return mapData.PublicName;
}

private getGameVariant(match: MatchStats) {
private getMatchVariant(match: MatchStats) {
switch (match.MatchInfo.GameVariantCategory) {
case GameVariantCategory.MultiplayerAttrition:
return "Attrition";
Expand Down

0 comments on commit 5e32d75

Please sign in to comment.