Skip to content

Commit

Permalink
Add missing goals to bridge duels
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathund committed Aug 2, 2024
1 parent a1478c6 commit 1c6e40a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/structures/MiniGames/Duels.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ class DuelsGamemode {
* @type {number}
*/
this.goldenApplesEatan = data[`${mode}_golden_apples_eaten`] || 0;
/**
* Goals (only shows up in bridge)
* @type {number}
*/
this.goals = data[`${mode}_goals`] || 0;
}
}

Expand Down Expand Up @@ -803,6 +808,18 @@ class DuelsBridge {
this['2v2v2v2'].goldenApplesEatan +
this['3v3v3v3'].goldenApplesEatan +
this.ctf.goldenApplesEatan;
/**
* Goals
* @type {number}
*/
this.goals =
this.solo.goals +
this.doubles.goals +
this.threes.goals +
this.fours.goals +
this['2v2v2v2'].goals +
this['3v3v3v3'].goals +
this.ctf.goals;
}
}

Expand Down
2 changes: 2 additions & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3814,6 +3814,7 @@ declare module 'hypixel-api-reborn' {
blocksPlaced: number;
healthRegenerated: number;
goldenApplesEatan: number;
goals: number;
}
class DuelsUHC {
constructor(data: Record<string, unknown>, mode: string, title: string);
Expand Down Expand Up @@ -3941,6 +3942,7 @@ declare module 'hypixel-api-reborn' {
blocksPlaced: number;
healthRegenerated: number;
goldenApplesEatan: number;
goals: number;
}
class Duels {
constructor(data: Record<string, unknown>);
Expand Down

0 comments on commit 1c6e40a

Please sign in to comment.