Updated bw stats
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { PRESTIGE_ICONS, PRESTIGES } from "@/data/hypixel/bedwars"
|
||||
import { PRESTIGE_ICONS, PRESTIGES, SLUMBER_ROOMS, SLUMBER_WALLETS } from "@/data/hypixel/bedwars"
|
||||
import { floorLevel } from "./formatters"
|
||||
|
||||
export function getBedwarsStar(level: number) {
|
||||
@@ -36,3 +36,27 @@ export function getPrestigeName(level: number) {
|
||||
|
||||
return PRESTIGES.find(p => p.level === floored)!.name
|
||||
}
|
||||
|
||||
export function getWalletMax(name?: string) {
|
||||
if (!name) return 25
|
||||
|
||||
const wallets = SLUMBER_WALLETS as Record<string, number>
|
||||
|
||||
if (!wallets[name]) return 25
|
||||
|
||||
return wallets[name]
|
||||
}
|
||||
|
||||
export function getLatestRoom(rooms?: Record<string, boolean>) {
|
||||
if (!rooms) return null
|
||||
|
||||
let latestRoom = null
|
||||
|
||||
for (const room of SLUMBER_ROOMS) {
|
||||
if (rooms[room.id]) {
|
||||
latestRoom = room.name
|
||||
}
|
||||
}
|
||||
|
||||
return latestRoom
|
||||
}
|
||||
|
||||
@@ -24,7 +24,19 @@ export const playerSchema = z.looseObject({
|
||||
losses_bedwars: z.number().default(0),
|
||||
beds_broken_bedwars: z.number().default(0),
|
||||
beds_lost_bedwars: z.number().default(0),
|
||||
total_challenges_completed: z.number().default(0)
|
||||
total_challenges_completed: z.number().default(0),
|
||||
iron_resources_collected_bedwars: z.number().default(0),
|
||||
gold_resources_collected_bedwars: z.number().default(0),
|
||||
diamond_resources_collected_bedwars: z.number().default(0),
|
||||
emerald_resources_collected_bedwars: z.number().default(0),
|
||||
_items_purchased_bedwars: z.number().default(0),
|
||||
slumber: z.looseObject({
|
||||
tickets: z.number().default(0),
|
||||
bag_type: z.string(),
|
||||
total_tickets_earned: z.number(),
|
||||
doublers: z.number(),
|
||||
room: z.record(z.string(), z.boolean())
|
||||
}).optional()
|
||||
}).optional()
|
||||
}),
|
||||
quests: z.record(
|
||||
|
||||
Reference in New Issue
Block a user