Skip to content

Commit

Permalink
Prepare for Coins Removeal
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathund committed Oct 22, 2024
1 parent eb50b75 commit 2e4b6e8
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/structures/MiniGames/Arcade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ class Arcade {
throwOut: ThrowOut;
zombies: Zombies;
constructor(data: Record<string, any> = {}) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.weeklyCoins = parseInt(data?.[`weekly_coins_${weekAB()}`] || 0, 10);
this.monthlyCoins = parseInt(data?.[`monthly_coins_${monthAB()}`] || 0, 10);
this.hintsDisabled = !data?.hints;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/ArenaBrawl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ArenaBrawl {
'2v2': ArenaBrawlMode;
'4v4': ArenaBrawlMode;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.coinsSpent = data?.coins_spent || 0;
this.wins = data?.wins || 0;
this.keys = data?.keys || 0;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/BedWars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class BedWars {
slumberTickets: number;
totalSlumberTicket: number;
constructor(data: Record<string, any>) {
this.tokens = data?.coins || 0;
this.tokens = data?.coins || data?.tokens || 0;
this.level = data?.Experience ? getLevelForExp(data?.Experience) : 0;
this.experience = data?.Experience || 0;
this.prestige = getBedWarsPrestige(getLevelForExp(data?.Experience));
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/BlitzSurvivalGames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class BlitzSurvivalGames {
creepertamer: BlitzSGKit;
snowman: BlitzSGKit;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.kills = data?.kills || 0;
this.kit = data?.defaultkit || '';
this.killsSolo = data?.kills_solo_normal || 0;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/BuildBattle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class BuildBattle {
this.games = data?.games_played || 0;
this.WLR = divide(this.totalWins, this.games);
this.superVotes = data?.super_votes || 0;
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.totalVotes = data?.total_votes || 0;
this.wins = {
solo: data?.wins_solo_normal || 0,
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/CopsAndCrims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CopsAndCrims {
this.defusal = new CopsAndCrimsDefusal(data);
this.deathmath = new CopsAndCrimsDeathmatch(data);
this.gunGame = new CopsAndCrimsGunGame(data);
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.kills = this.defusal.kills + this.deathmath.kills + this.gunGame.kills;
this.assists = this.defusal.assists + this.deathmath.assists + this.gunGame.assists;
this.deaths = this.defusal.deaths + this.deathmath.deaths + this.gunGame.deaths;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/Duels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export class Duels {
parkour: DuelsGamemode;
arena: DuelsGamemode;
constructor(data: Record<string, any>) {
this.tokens = data?.coins || 0;
this.tokens = data?.coins || data?.tokens || 0;
this.title = getTitle(data, 'all_modes');
this.kills = data?.kills || 0;
this.deaths = data?.deaths || 0;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/MegaWalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class MegaWalls {
snowman: MegaWallsKitStats;
constructor(data: Record<string, any>) {
this.selectedClass = data?.chosen_class || '';
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.kills = data?.kills || 0;
this.assists = data?.assists || 0;
this.deaths = data?.deaths || 0;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/MurderMystery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MurderMystery {
doubleUp: MurderMysteryModeStats;
infection: MurderMysteryModeStats;
constructor(data: Record<string, any>) {
this.tokens = data?.coins || 0;
this.tokens = data?.coins || data?.tokens || 0;
this.goldPickedUp = data?.coins_pickedup || 0;
this.playedGames = data?.games || 0;
this.kills = data?.kills || 0;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/Paintball.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Paintball {
superluck: number;
transfusion: number;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.kills = data?.kills || 0;
this.deaths = data?.deaths || 0;
this.KDR = divide(this.kills, this.deaths);
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/Quakecraft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Quakecraft {
sight: string;
trigger: string;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.solo = new QuakecraftMode(data);
this.teams = new QuakecraftMode(data, 'teams');
this.wins = this.solo?.wins + this.teams?.wins;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/SmashHeroes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class SmashHeroes {
shoopDaWhoop: SmashHeoresHero;
greenHood: SmashHeoresHero;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.level = data?.smash_level_total || 0;
this.winstreak = data?.win_streak || 0;
this.playedGames = data?.games || 0;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/SpeedUHC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SpeedUHC {
teamNormal: SpeedUHCMode;
teamInsane: SpeedUHCMode;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.kills = data?.kills || 0;
this.deaths = data?.deaths || 0;
this.KDR = divide(this.kills, this.deaths);
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/TNTGames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class TNTGames {
tnttag: TNTTag;
wizards: TNTWizards;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.winstreak = data?.winstreak || 0;
this.wins = data?.wins || 0;
this.tntrun = new TNTRun(data);
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/TurboKartRacers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class TurboKartRacers {
grandPrix: boolean;
grandPrixTokens: number;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.wins = data?.wins || 0;
this.completedLaps = data?.laps_completed || 0;
this.bronzeTrophies = data?.bronze_trophy || 0;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/UHC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class UHC {
extraUltimatesCrafted: number;
starLevel: number;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.score = data?.score || 0;
this.kit = data?.equippedKit || '';
this.solo = new UHCGamemode(data, 'solo');
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/VampireZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class VampireZ {
KDR: number;
wins: number;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.goldBought = data?.gold_bought || 0;
this.blood = data?.blood || false;
this.zombieKills = data?.zombie_kills || 0;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/Walls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Walls {
WLR: number;
assists: number;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.kills = data?.kills || 0;
this.deaths = data?.deaths || 0;
this.KDR = divide(this.kills, this.deaths);
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/Warlords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Warlords {
revenant: WarlordsClass;
spiritguard: WarlordsClass;
constructor(data: Record<string, any>) {
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.kills = data?.kills || 0;
this.deaths = data?.deaths || 0;
this.KDR = divide(this.kills, this.deaths);
Expand Down
2 changes: 1 addition & 1 deletion src/structures/MiniGames/WoolGames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class WoolGames {
this.xp = data?.progression?.experience || 0;
this.exactLevel = this.convertXPToLevel(this.xp);
this.level = Math?.floor(this.exactLevel);
this.coins = data?.coins || 0;
this.coins = data?.coins || data?.tokens || 0;
this.ownedCosmetics = data?.packages || [];
this.privateGamesConfig = data?.privategames || {};
this.playtime = data?.playtime || 0;
Expand Down

0 comments on commit 2e4b6e8

Please sign in to comment.