Updated skywars stats
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user