Updated copsandcrims

This commit is contained in:
2025-09-09 19:53:04 +02:00
parent 1336a1787e
commit 3c466d81cf
4 changed files with 136 additions and 2 deletions

View File

@@ -660,6 +660,40 @@ export const megawallsStats = z.looseObject({
...megawallsModeStats()
})
function copsAndCrimsGunUpgrades() {
const ids = [
"knife",
"pistol",
"handgun",
"magnum",
"sniper",
"bullpup",
"smg",
"rifle",
"carbine",
"scoped_rifle",
"shotgun",
"auto_shotgun"
] as const
const upgrades = [
"damage_increase",
"recoil_reduction",
"reload_speed_reduction",
"cost_reduction"
] as const
const entries = new Map<string, z.ZodDefault<z.ZodNumber>>()
for (const id of ids) {
for (const upgrade of upgrades) {
entries.set(`${id}_${upgrade}`, z.number().default(0))
}
}
return Object.fromEntries(entries) as Record<`${typeof ids[number]}_${typeof upgrades[number]}`, z.ZodDefault<z.ZodNumber>>
}
export const copsAndCrimsStatsSchema = z.looseObject({
kills: z.number().default(0),
assists: z.number().default(0),
@@ -684,5 +718,8 @@ export const copsAndCrimsStatsSchema = z.looseObject({
shots_fired: z.number().default(0),
coins: z.number().default(0),
round_wins: z.number().default(0),
headshot_kills: z.number().default(0)
headshot_kills: z.number().default(0),
knife_attack_delay: z.number().default(0),
sniper_charge_bonus: z.number().default(0),
...copsAndCrimsGunUpgrades()
})