From eb13e07305169c0f19ee87e2516005eb5c0ef3c9 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 20 May 2022 22:54:05 -0500 Subject: fastest_target_practice stat & leaderboard --- src/cleaners/skyblock/stats.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/cleaners/skyblock') diff --git a/src/cleaners/skyblock/stats.ts b/src/cleaners/skyblock/stats.ts index 8105f26..a89bdd2 100644 --- a/src/cleaners/skyblock/stats.ts +++ b/src/cleaners/skyblock/stats.ts @@ -85,6 +85,9 @@ export interface StatItem { } export function getStatUnit(name: string): string | null { + if (name === 'fastest_target_practice') + return 'time' + for (const [unitName, statMatchers] of Object.entries(statUnits)) { for (const statMatch of statMatchers) { let trailingEnd = statMatch[0] === '_' @@ -118,5 +121,15 @@ export function cleanProfileStats(data: typedHypixelApi.SkyBlockProfileMember): }) } + if (data.fastest_target_practice !== undefined) + stats.push({ + categorizedName: 'fastest_target_practice', + // the api gives it in seconds, we want milliseconds + value: data.fastest_target_practice * 1000, + rawName: 'fastest_target_practice', + category: 'misc', + unit: 'time' + }) + return stats } -- cgit