Updated skywars stats

This commit is contained in:
2025-08-24 14:01:10 +02:00
parent ba84f90221
commit 9b1b25c5e9
8 changed files with 65 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
import { BedwarsModeStats } from "./hypixel/bedwars"
import { devide } from "./hypixel/general"
export function concatStatArrays(...stats: BedwarsModeStats[]) {
export function concatBedwarsStats(...stats: BedwarsModeStats[]) {
if (stats.length === 0) return []
const base: BedwarsModeStats = {
@@ -29,11 +30,6 @@ export function concatStatArrays(...stats: BedwarsModeStats[]) {
base.beds_lost_bedwars += s.beds_lost_bedwars
}
const devide = (a: number, b: number) => {
if (b === 0) return a
return a / b
}
const ret = {
...base,
winstreak: base.winstreak < 0 ? "?" : base.winstreak,