Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/discord-bot/src/commands/ratios/ratios.command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ export class RatiosCommand {

private getModeStats(game: PlayerStats[keyof PlayerStats], mode: GameModeWithSubModes<any>) {
if (mode.submodes.length !== 0) {
let stats = game[mode.api as keyof typeof game];
stats = stats[mode.submodes[0].api as keyof typeof game];
return mode.submodes[0].api === "overall" ? stats || game : stats;
const stats = game[mode.api as keyof typeof game];
const submodeStats = stats[mode.submodes[0].api as keyof typeof stats];
return mode.submodes[0].api === "overall" ? submodeStats || stats : submodeStats;
}

const stats = game[mode.api as keyof typeof game];
Expand Down
4 changes: 2 additions & 2 deletions packages/schemas/src/player/gamemodes/arcade/mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,11 @@ export class Disasters {
public constructor(data: APIData = {}, ap: APIData = {}) {
this.gamesPlayed = data.games_played;
this.wins = data.wins;
this.losses = data.losses;
this.wlr = ratio(this.wins, this.losses);
this.playtime = (data.time_survived ?? 0) * 1000;
this.survivals = new DisasterSurvivals(data.survived ?? {});
this.deaths = new DisastersDeaths(data.deaths ?? {});
this.losses = data.losses ?? this.deaths.overall;
Comment thread
ugcodrr marked this conversation as resolved.
Outdated
this.wlr = ratio(this.wins, this.losses);
this.powerups = ap.arcade_disasters_prepared;
}
}
Expand Down
Loading