diff --git a/src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx b/src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx index 87d9da5..b8a628c 100644 --- a/src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx +++ b/src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx @@ -47,7 +47,6 @@ export default function WoolGamesStats({ stats }: { stats: NonNullStats["WoolGam - diff --git a/src/data/hypixel/woolgames.ts b/src/data/hypixel/woolgames.ts index a84f37f..8924b03 100644 --- a/src/data/hypixel/woolgames.ts +++ b/src/data/hypixel/woolgames.ts @@ -26,12 +26,12 @@ export const ICONS = { YIN_YANG: "\u262f" // ☯ } as const export const CLASSES = [ - { id: "TANK", name: "Tank", difficulty: 1 }, - { id: "ARCHER", name: "Archer", difficulty: 2 }, - { id: "SWORDSMAN", name: "Swordsman", difficulty: 1 }, - { id: "ENGINEER", name: "Engineer", difficulty: 1 }, - { id: "GOLEM", name: "Golem", difficulty: 2 }, - { id: "ASSAULT", name: "Assault", difficulty: 3 } + { id: "tank", name: "Tank", difficulty: 1 }, + { id: "archer", name: "Archer", difficulty: 2 }, + { id: "swordsman", name: "Swordsman", difficulty: 1 }, + { id: "engineer", name: "Engineer", difficulty: 1 }, + { id: "golem", name: "Golem", difficulty: 2 }, + { id: "assault", name: "Assault", difficulty: 3 } ] as const export const DIFFICULTIES = { "1": "green", diff --git a/src/lib/hypixel/woolgames/general.ts b/src/lib/hypixel/woolgames/general.ts index f0643c1..594a8c9 100644 --- a/src/lib/hypixel/woolgames/general.ts +++ b/src/lib/hypixel/woolgames/general.ts @@ -1,9 +1,18 @@ import { CLASSES, DIFFICULTIES, EASY_XP, ICONS, NORMAL_XP, PRESTIGES } from "@/data/hypixel/woolgames" import { getColorFromCode } from "@/lib/colors" +import { NonNullStats } from "@/lib/schema/player" import { floorLevel } from "../general" +export function getWoolGamesWoolWarsClassStats( + classId: typeof CLASSES[number]["id"], + { stats }: NonNullable["wool_wars"]> +) { + const id = classId.toLowerCase() + return [] +} + export function getWoolGamesWoolWarsClass(val?: string) { - const klass = CLASSES.find(c => c.id === val) + const klass = CLASSES.find(c => c.id === val?.toLowerCase()) return klass || null } diff --git a/src/lib/schema/stats.ts b/src/lib/schema/stats.ts index 954cec5..17f4e53 100644 --- a/src/lib/schema/stats.ts +++ b/src/lib/schema/stats.ts @@ -724,6 +724,15 @@ export const copsAndCrimsStatsSchema = z.looseObject({ ...copsAndCrimsGunUpgrades() }) +const woolGamesClassStats = z.looseObject({ + kills: z.number().default(0), + assists: z.number().default(0), + deaths: z.number().default(0), + wool_placed: z.number().default(0), + blocks_broken: z.number().default(0), + powerups_gotten: z.number().default(0) +}) + export const woolGamesStatsSchema = z.looseObject({ wool_wars_prestige_icon: z.string().optional(), playtime: z.number().default(0), @@ -768,7 +777,15 @@ export const woolGamesStatsSchema = z.looseObject({ losses: z.number().default(0), wool_placed: z.number().default(0), blocks_broken: z.number().default(0), - powerups_gotten: z.number().default(0) + powerups_gotten: z.number().default(0), + classes: z.looseObject({ + tank: woolGamesClassStats.optional(), + archer: woolGamesClassStats.optional(), + swordsman: woolGamesClassStats.optional(), + engineer: woolGamesClassStats.optional(), + golem: woolGamesClassStats.optional(), + assault: woolGamesClassStats.optional() + }).optional() }).optional() }).optional() })