From 1befe6cc5735f358add036cc896560ab2ad44ca4 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 22 Oct 2024 22:48:01 +0100 Subject: [PATCH] add fc pp to pp hover --- projects/website/src/components/score/score-stats.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/website/src/components/score/score-stats.tsx b/projects/website/src/components/score/score-stats.tsx index 9cd7621..11bd854 100644 --- a/projects/website/src/components/score/score-stats.tsx +++ b/projects/website/src/components/score/score-stats.tsx @@ -8,6 +8,7 @@ import ScoreMissesBadge from "@/components/score/badges/score-misses"; import { Modifier } from "@ssr/common/score/modifier"; import { ScoreModifiers } from "@/components/score/score-modifiers"; import { renderChange } from "@/common/change"; +import { scoresaberService } from "@ssr/common/service/impl/scoresaber"; const badges: ScoreBadge[] = [ { @@ -15,7 +16,8 @@ const badges: ScoreBadge[] = [ color: () => { return "bg-pp"; }, - create: (score: ScoreSaberScore) => { + create: (score: ScoreSaberScore, leaderboard: ScoreSaberLeaderboard) => { + const fcAccuracy = score.additionalData?.fcAccuracy; const pp = score.pp; const weight = score.weight; if (pp === 0 || pp === undefined || weight === undefined) { @@ -33,6 +35,7 @@ const badges: ScoreBadge[] = [

Weighted: {formatPp(weightedPp)}pp ({(100 * weight).toFixed(2)}%)

+ {fcAccuracy &&

Full Combo: {scoresaberService.getPp(leaderboard.stars, fcAccuracy).toFixed(0)}pp

} } >