Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
39 changes: 33 additions & 6 deletions apps/discord-bot/src/commands/arcade/arcade.profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,25 @@ export const ArcadeProfile = ({
break;

case "disasters":
table = <DisastersTable stats={arcade[api]} t={t} submode={mode.submode} />;
sidebar.push([t("stats.powerups"), t(arcade.disasters.powerups), "§5"]);
table = (
<DisastersTable stats={arcade[api]} t={t} submode={mode.submode} />
);
break;

case "dragonWars":
table = <DragonWarsTable stats={arcade[api]} t={t} />;
break;

case "dropper":
table = <DropperTable stats={arcade[api]} t={t} time={time} submode={mode.submode} />;
table = (
<DropperTable
stats={arcade[api]}
t={t}
time={time}
submode={mode.submode}
/>
);
break;

case "enderSpleef":
Expand Down Expand Up @@ -118,7 +128,14 @@ export const ArcadeProfile = ({
break;

case "partyGames":
table = <PartyGamesTable stats={arcade[api]} t={t} submode={mode.submode} time={time} />;
table = (
<PartyGamesTable
stats={arcade[api]}
t={t}
submode={mode.submode}
time={time}
/>
);
break;

case "pixelPainters":
Expand All @@ -138,9 +155,19 @@ export const ArcadeProfile = ({
break;

case "zombies":
table = submode.api === "overall" ?
<ZombiesTable stats={arcade[api]} t={t} time={time} /> :
<ZombiesMapTable stats={arcade[api]} map={submode.api} t={t} time={time} />;
table =
submode.api === "overall" ?
(
<ZombiesTable stats={arcade[api]} t={t} time={time} />
) :
(
<ZombiesMapTable
stats={arcade[api]}
map={submode.api}
t={t}
time={time}
/>
);
break;

default:
Expand Down
18 changes: 7 additions & 11 deletions packages/schemas/src/player/gamemodes/arcade/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ export const ARCADE_MODES = new GameModes([
{
api: "disasters",
hypixel: "DISASTERS",
submodes: [
{ api: "overall" },
{ api: "survivals" },
{ api: "deaths" },
],
submodes: [{ api: "overall" }, { api: "survivals" }, { api: "deaths" }],
},
{ api: "dragonWars", hypixel: "DRAGONWARS2" },
{
Expand All @@ -68,10 +64,7 @@ export const ARCADE_MODES = new GameModes([
{
api: "partyGames",
hypixel: "PARTY",
submodes: [
{ api: "overall" },
{ api: "roundWins" },
],
submodes: [{ api: "overall" }, { api: "roundWins" }],
},
{ api: "pixelPainters", hypixel: "DRAW_THEIR_THING" },
{ api: "pixelParty", hypixel: "PIXEL_PARTY" },
Expand All @@ -88,7 +81,10 @@ export const ARCADE_MODES = new GameModes([
],
},

{ hypixel: "HIDE_AND_SEEK_PARTY_POOPER", formatted: "Hide and Seek Party Pooper" },
{
hypixel: "HIDE_AND_SEEK_PARTY_POOPER",
formatted: "Hide and Seek Party Pooper",
},
{ hypixel: "HIDE_AND_SEEK_PROP_HUNT", formatted: " Hide and Seek Prop Hunt" },
] as const);

Expand Down Expand Up @@ -171,7 +167,7 @@ export class Arcade {
this.blockingDead = new BlockingDead(data);
this.bountyHunters = new BountyHunters(data);
this.creeperAttack = new CreeperAttack(data);
this.disasters = new Disasters(data?.disasters?.stats);
this.disasters = new Disasters(data?.disasters?.stats, ap);
this.dragonWars = new DragonWars(data, ap);
this.dropper = new Dropper(data?.dropper);
this.enderSpleef = new EnderSpleef(data);
Expand Down
6 changes: 5 additions & 1 deletion packages/schemas/src/player/gamemodes/arcade/mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,14 +424,18 @@ export class Disasters {
@Field({ leaderboard: { name: "" } })
public deaths: DisastersDeaths;

public constructor(data: APIData = {}) {
@Field()
public powerups: number;

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.powerups = ap.arcade_disasters_prepared;
}
}

Expand Down
Loading