Added all table stats

This commit is contained in:
2025-09-02 01:06:49 +02:00
parent 2cb9db4264
commit c6147f1a5f
2 changed files with 36 additions and 4 deletions

View File

@@ -200,7 +200,9 @@ function duelsModeStats() {
const stats = [
"kills",
"bridge_kills",
"deaths",
"bridge_deaths",
"wins",
"losses",
"melee_swings",
@@ -219,8 +221,18 @@ function duelsModeStats() {
for (const id of ids) {
for (const stat of stats) {
if (id.startsWith("bridge_") && stat === "goals") {
bridge.set(`${id}_${stat}`, z.number().default(0))
if (id.startsWith("bridge_")) {
if (stat === "goals") {
bridge.set(`${id}_${stat}`, z.number().default(0))
}
if (stat === "bridge_kills") {
bridge.set(`${id}_${stat}`, z.number().default(0))
}
if (stat === "bridge_deaths") {
bridge.set(`${id}_${stat}`, z.number().default(0))
}
continue
}
@@ -235,7 +247,7 @@ function duelsModeStats() {
}
type Modes = typeof ids[number]
type Stats = Exclude<typeof stats[number], "current_winstreak_mode" | "best_winstreak_mode" | "goals">
type Stats = Exclude<typeof stats[number], "current_winstreak_mode" | "best_winstreak_mode" | "goals" | "bridge_kills" | "bridge_deaths">
type BridgeModes = Extract<Modes, "bridge_duel" | "bridge_doubles" | "bridge_threes" | "bridge_four" | "bridge_2v2v2v2" | "bridge_3v3v3v3">
return {