Skip to content

Commit

Permalink
revert casing
Browse files Browse the repository at this point in the history
github sucks and didnt want to let me rename the caseing of the file
name
  • Loading branch information
Kathund committed Aug 15, 2024
1 parent 44c3d5f commit fb04348
Show file tree
Hide file tree
Showing 24 changed files with 149 additions and 149 deletions.
22 changes: 11 additions & 11 deletions src/structures/MiniGames/Arcade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { removeSnakeCaseString } from '../../utils/removeSnakeCase';
import { weekAB, monthAB } from '../../utils/oscillation';
import Divide from '../../utils/Divide';
import divide from '../../utils/divide';

function parseZombiesKills(data: Record<string, any>): Record<string, number> {
const matches = Array.from(Object.keys(data))
Expand Down Expand Up @@ -68,9 +68,9 @@ class Zombies {
this.killsByZombie = parseZombiesKills(data);
this.bulletsHit = data.bullets_hit_zombies || 0;
this.bulletsShot = data.bullets_shot_zombies || 0;
this.gunAccuracy = Divide(this.bulletsHit, this.bulletsShot);
this.gunAccuracy = divide(this.bulletsHit, this.bulletsShot);
this.headshots = data.headshots_zombies || 0;
this.headshotAccuracy = Divide(this.headshots, this.bulletsShot);
this.headshotAccuracy = divide(this.headshots, this.bulletsShot);
}
}

Expand Down Expand Up @@ -114,7 +114,7 @@ class BountyHunters {
this.wins = data.wins_oneinthequiver || 0;
this.kills = data.kills_oneinthequiver || 0;
this.deaths = data.deaths_oneinthequiver || 0;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.bountyKills = data.bounty_kills_oneinthequiver || 0;
this.bowKills = data.bow_kills_oneinthequiver || 0;
this.swordKills = data.sword_kills_oneinthequiver || 0;
Expand All @@ -139,11 +139,11 @@ class CaptureTheWool {
constructor(data: Record<string, any>) {
this.wins = data.woolhunt_participated_wins || 0;
this.losses = data.woolhunt_participated_losses || 0;
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.draws = data.woolhunt_participated_draws || 0;
this.kills = data.woolhunt_kills || 0;
this.deaths = data.woolhunt_deaths || 0;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.assists = data.woolhunt_assists || 0;
this.woolPickedUp = data.woolhunt_wools_stolen || 0;
this.woolCaptured = data.woolhunt_wools_captured || 0;
Expand Down Expand Up @@ -371,13 +371,13 @@ class MiniWalls {
this.wins = data.wins_mini_walls || 0;
this.kills = data.kills_mini_walls || 0;
this.deaths = data.deaths_mini_walls || 0;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.finalKills = data.final_kills_mini_walls || 0;
this.witherKills = data.wither_kills_mini_walls || 0;
this.witherDamage = data.wither_damage_mini_walls || 0;
this.arrowsShot = data.arrows_shot_mini_walls || 0;
this.arrowsHit = data.arrows_hit_mini_walls || 0;
this.bowAccuracy = Divide(this.arrowsHit, this.arrowsShot);
this.bowAccuracy = divide(this.arrowsHit, this.arrowsShot);
}
}
/**
Expand Down Expand Up @@ -407,7 +407,7 @@ class PixelPartyGameMode {
this.wins = data?.[`wins_${modeName}`] || 0;
this.gamesPlayed = data?.[`games_played_${modeName}`] || 0;
this.losses = this.gamesPlayed - this.wins;
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.roundsPlayed = data?.[`rounds_completed_${modeName}`] || 0;
this.powerUpsCollected = data?.[`power_ups_collected_${modeName}`] || 0;
}
Expand All @@ -431,7 +431,7 @@ class PixelParty {
this.wins = data?.pixel_party?.wins || 0;
this.gamesPlayed = data?.pixel_party?.games_played || 0;
this.losses = this.gamesPlayed - this.wins;
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.roundsPlayed = data?.pixel_party?.rounds_completed || 0;
this.powerUpsCollected = data?.pixel_party?.power_ups_collected || 0;
this.normal = new PixelPartyGameMode(data.pixel_party, 'normal');
Expand All @@ -453,7 +453,7 @@ class ThrowOut {
this.wins = data.wins_throw_out || 0;
this.kills = data.kills_throw_out || 0;
this.deaths = data.deaths_throw_out || 0;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
}
}
/**
Expand Down
6 changes: 3 additions & 3 deletions src/structures/MiniGames/ArenaBrawl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Divide from '../../utils/Divide';
import divide from '../../utils/divide';

class ArenaBrawlMode {
damage: number;
Expand All @@ -15,11 +15,11 @@ class ArenaBrawlMode {
this.damage = data[`damage_${mode}`];
this.kills = data[`kills_${mode}`];
this.deaths = data[`deaths_${mode}`];
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.healed = data[`healed_${mode}`];
this.wins = data[`wins_${mode}`];
this.losses = data[`losses_${mode}`];
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.games = data[`games_${mode}`];
this.winstreak = data[`win_streaks_${mode}`];
}
Expand Down
30 changes: 15 additions & 15 deletions src/structures/MiniGames/BedWars.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Divide from '../../utils/Divide';
import divide from '../../utils/divide';

export type BedWarsPrestige =
| 'Stone'
Expand Down Expand Up @@ -167,18 +167,18 @@ function generateStatsForMode(data: Record<string, any>, mode: string): BedWarsM
beds: {
broken: data[`${mode}_beds_broken_bedwars`] || 0,
lost: data[`${mode}_beds_lost_bedwars`] || 0,
BLRatio: Divide(data[`${mode}_beds_broken_bedwars`], data[`${mode}_beds_lost_bedwars`])
BLRatio: divide(data[`${mode}_beds_broken_bedwars`], data[`${mode}_beds_lost_bedwars`])
},

avg: {
kills: Divide(data[`${mode}_kills_bedwars`], data[`${mode}_games_played_bedwars`]),
finalKills: Divide(data[`${mode}_final_kills_bedwars`], data[`${mode}_games_played_bedwars`]),
bedsBroken: Divide(data[`${mode}_beds_broken_bedwars`], data[`${mode}_games_played_bedwars`])
kills: divide(data[`${mode}_kills_bedwars`], data[`${mode}_games_played_bedwars`]),
finalKills: divide(data[`${mode}_final_kills_bedwars`], data[`${mode}_games_played_bedwars`]),
bedsBroken: divide(data[`${mode}_beds_broken_bedwars`], data[`${mode}_games_played_bedwars`])
},

KDRatio: Divide(data[`${mode}_kills_bedwars`], data[`${mode}_deaths_bedwars`]),
WLRatio: Divide(data[`${mode}_wins_bedwars`], data[`${mode}_losses_bedwars`]),
finalKDRatio: Divide(data[`${mode}_final_kills_bedwars`], data[`${mode}_final_deaths_bedwars`])
KDRatio: divide(data[`${mode}_kills_bedwars`], data[`${mode}_deaths_bedwars`]),
WLRatio: divide(data[`${mode}_wins_bedwars`], data[`${mode}_losses_bedwars`]),
finalKDRatio: divide(data[`${mode}_final_kills_bedwars`], data[`${mode}_final_deaths_bedwars`])
};
}

Expand Down Expand Up @@ -428,16 +428,16 @@ class BedWars {
this.beds = {
lost: data.beds_lost_bedwars || 0,
broken: data.beds_broken_bedwars || 0,
BLRatio: Divide(data.beds_broken_bedwars, data.beds_lost_bedwars)
BLRatio: divide(data.beds_broken_bedwars, data.beds_lost_bedwars)
};
this.avg = {
kills: Divide(this.kills, this.playedGames),
finalKills: Divide(this.finalKills, this.playedGames),
bedsBroken: Divide(this.beds.broken, this.playedGames)
kills: divide(this.kills, this.playedGames),
finalKills: divide(this.finalKills, this.playedGames),
bedsBroken: divide(this.beds.broken, this.playedGames)
};
this.KDRatio = Divide(this.kills, this.deaths);
this.finalKDRatio = Divide(this.finalKills, this.finalDeaths);
this.WLRatio = Divide(this.wins, this.losses);
this.KDRatio = divide(this.kills, this.deaths);
this.finalKDRatio = divide(this.finalKills, this.finalDeaths);
this.WLRatio = divide(this.wins, this.losses);
this.solo = generateStatsForMode(data, 'eight_one');
this.doubles = generateStatsForMode(data, 'eight_two');
this.threes = generateStatsForMode(data, 'four_three');
Expand Down
14 changes: 7 additions & 7 deletions src/structures/MiniGames/BlitzSurvivalGames.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Divide from '../../utils/Divide';
import divide from '../../utils/divide';

class BlitzSGKit {
level: number;
Expand All @@ -25,14 +25,14 @@ class BlitzSGKit {
this.exp = data[`exp_${kitName}`] || 0;
this.kills = data[`kills_${kitName}`] || 0;
this.deaths = data[`deaths_${kitName}`] || 0;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.wins = data[`wins_${kitName}`] || 0;
this.gamesPlayed = data[`games_played_${kitName}`] || 0;
this.losses = this.gamesPlayed - this.wins;
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.arrowsShot = data[`arrows_fired_${kitName}`] || 0;
this.arrowsHit = data[`arrows_hit_${kitName}`] || 0;
this.bowAccuracy = Divide(this.arrowsHit, this.arrowsShot);
this.bowAccuracy = divide(this.arrowsHit, this.arrowsShot);
this.damage = data[`damage_${kitName}`] || 0;
this.damageTaken = data[`damage_taken_${kitName}`] || 0;
this.potionsDrunk = data[`potions_drunk_${kitName}`] || 0;
Expand Down Expand Up @@ -115,16 +115,16 @@ class BlitzSurvivalGames {
this.killsSolo = data.kills_solo_normal || 0;
this.killsTeams = data.kills_teams_normal || 0;
this.deaths = data.deaths || 0;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.wins = data.wins || 0;
this.winsSolo = data.wins_solo_normal || 0;
this.winsTeam = data.wins_teams || 0;
this.gamesPlayed = data.games_played || 0;
this.losses = this.gamesPlayed - this.wins;
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.arrowsShot = data.arrows_fired || 0;
this.arrowsHit = data.arrows_hit || 0;
this.bowAccuracy = Divide(this.arrowsHit, this.arrowsShot);
this.bowAccuracy = divide(this.arrowsHit, this.arrowsShot);
this.damage = data.damage || 0;
this.damageTaken = data.damage_taken || 0;
this.potionsDrunk = data.potions_drunk || 0;
Expand Down
4 changes: 2 additions & 2 deletions src/structures/MiniGames/BuildBattle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Divide from '../../utils/Divide';
import divide from '../../utils/divide';

export interface BuildBattleWins {
solo: number;
Expand All @@ -23,7 +23,7 @@ class BuildBattle {
this.score = data.score || 0;
this.totalWins = data.wins || 0;
this.games = data.games_played || 0;
this.WLRatio = Divide(this.totalWins, this.games);
this.WLRatio = divide(this.totalWins, this.games);
this.superVotes = data.super_votes || 0;
this.coins = data.coins || 0;
this.totalVotes = data.total_votes || 0;
Expand Down
18 changes: 9 additions & 9 deletions src/structures/MiniGames/CopsAndCrims.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Divide from '../../utils/Divide';
import divide from '../../utils/divide';
/**
* Cops and crims Defusal class
*/
Expand All @@ -23,11 +23,11 @@ class CopsAndCrimsDefusal {
this.headshotKills = data.headshot_kills || 0;
this.assists = data.assists || 0;
this.deaths = data.deaths || 0;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.wins = data.game_wins || 0;
this.gamesPlayed = data.game_plays || 0;
this.losses = this.gamesPlayed - this.wins;
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.roundWins = data.round_wins || 0;
this.shotsFired = data.shots_fired || 0;
this.bombsDefused = data.bombs_defused || 0;
Expand All @@ -54,11 +54,11 @@ class CopsAndCrimsDeathmatch {
this.kills = data.kills_deathmatch || 0;
this.assists = data.assists_deathmatch || 0;
this.deaths = data.deaths_deathmatch || 0;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.wins = data.game_wins_deathmatch || 0;
this.gamesPlayed = data.game_plays_deathmatch || 0;
this.losses = this.gamesPlayed - this.wins;
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.killsAsCrim = data.criminal_kills_deathmatch || 0;
this.killsAsCop = data.cop_kills_deathmatch || 0;
}
Expand All @@ -82,11 +82,11 @@ class CopsAndCrimsGunGame {
this.kills = data.kills_gungame || 0;
this.assists = data.assists_gungame || 0;
this.deaths = data.deaths_gungame || 0;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.wins = data.game_wins_gungame || 0;
this.gamesPlayed = data.game_plays_gungame || 0;
this.losses = this.gamesPlayed - this.wins;
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.killsAsCrim = data.criminal_kills_gungame || 0;
this.killsAsCop = data.cop_kills_gungame || 0;
this.fastestWin = data.fastest_win_gungame || 0;
Expand Down Expand Up @@ -122,11 +122,11 @@ class CopsAndCrims {
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;
this.KDRatio = Divide(this.kills, this.deaths);
this.KDRatio = divide(this.kills, this.deaths);
this.wins = this.defusal.wins + this.deathmath.wins + this.gunGame.wins;
this.gamesPlayed = this.defusal.gamesPlayed + this.deathmath.gamesPlayed + this.gunGame.gamesPlayed;
this.losses = this.gamesPlayed - this.wins;
this.WLRatio = Divide(this.wins, this.losses);
this.WLRatio = divide(this.wins, this.losses);
this.killsAsCrim = this.defusal.killsAsCrim + this.deathmath.killsAsCrim + this.gunGame.killsAsCrim;
this.killsAsCop = this.defusal.killsAsCop + this.deathmath.killsAsCop + this.gunGame.killsAsCop;
this.prefixColor = data.lobbyPrefixColor || '';
Expand Down
Loading

0 comments on commit fb04348

Please sign in to comment.