This commit is contained in:
2025-09-08 20:58:46 +02:00
parent f5a5a989d3
commit 0ceda994ee
31 changed files with 111 additions and 98 deletions

View File

@@ -2,7 +2,7 @@ import { AccordionContent, AccordionItem, AccordionTrigger } from "@/components/
import { Card, CardContent } from "@/components/ui/card"
import { Separator } from "@/components/ui/separator"
import { formatNumber } from "@/lib/formatters"
import { getScoreColor } from "@/lib/hypixel/copsandcrims/general"
import { getCopsAndCrimsScoreColor } from "@/lib/hypixel/copsandcrims/general"
import { devide } from "@/lib/hypixel/general"
import { NonNullStats } from "@/lib/schema/player"
import CollapsedStats from "../../_components/CollapsedStats"
@@ -18,7 +18,7 @@ export default function CopsAndCrimsStats({ stats }: { stats: NonNullStats["Cops
const wins = stats.game_wins + stats.game_wins_deathmatch + stats.game_wins_gungame
const kd = formatNumber(devide(kills, deaths))
const score = Math.floor(kills / 2 + (stats.bombs_planted + stats.bombs_defused) / 3 + wins + devide(kills, stats.shots_fired) * 200)
const scoreColor = getScoreColor(score)
const scoreColor = getCopsAndCrimsScoreColor(score)
return (
<AccordionItem value="cops-and-crims">