From 6281abffac75be6cd68666d23c894487c05bf6c5 Mon Sep 17 00:00:00 2001 From: Gyoo Date: Tue, 27 Aug 2024 09:34:56 +0000 Subject: [PATCH] fix: remove exScore from calculated metrics for DDR --- client/src/components/tables/cells/DDRScoreCell.tsx | 8 ++++++++ common/src/config/game-support/ddr.ts | 11 +---------- server/src/game-implementations/games/ddr.ts | 4 ---- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/client/src/components/tables/cells/DDRScoreCell.tsx b/client/src/components/tables/cells/DDRScoreCell.tsx index 39d4a931f..a1ca96301 100644 --- a/client/src/components/tables/cells/DDRScoreCell.tsx +++ b/client/src/components/tables/cells/DDRScoreCell.tsx @@ -6,12 +6,14 @@ export default function DDRScoreCell({ score, colour, grade, + exScore, scoreRenderFn, }: { score?: integer; grade: string; colour: string; showScore?: boolean; + exScore?: integer; scoreRenderFn?: (s: number) => string; }) { return ( @@ -23,6 +25,12 @@ export default function DDRScoreCell({ {grade}
{score !== undefined && <>{scoreRenderFn ? scoreRenderFn(score) : score}} + {(!!exScore || exScore === 0) && ( + <> +
+ [EX: {exScore}] + + )} ); } diff --git a/common/src/config/game-support/ddr.ts b/common/src/config/game-support/ddr.ts index ea4fd73a1..c773c0d8b 100644 --- a/common/src/config/game-support/ddr.ts +++ b/common/src/config/game-support/ddr.ts @@ -1,6 +1,5 @@ import { FAST_SLOW_MAXCOMBO } from "./_common"; -import { IIDXDans } from "./iidx"; -import { FmtNum, FmtPercent, FmtScoreNoCommas } from "../../utils/util"; +import { FmtNum, FmtScoreNoCommas } from "../../utils/util"; import { ClassValue, zodNonNegativeInt } from "../config-utils"; import { p } from "prudence"; import { z } from "zod"; @@ -146,10 +145,6 @@ export const DDR_SP_CONF = { description: "Flare Skill as it's implemented in DDR World.", formatter: FmtScoreNoCommas, }, - exScore: { - description: "The EXScore.", - formatter: FmtScoreNoCommas, - }, }, sessionRatingAlgs: { @@ -157,10 +152,6 @@ export const DDR_SP_CONF = { description: "Average of your 10 best Flare Points this session", formatter: FmtScoreNoCommas, }, - exScore: { - description: "Average of your 10 best EXScores this session", - formatter: FmtScoreNoCommas, - }, }, profileRatingAlgs: { diff --git a/server/src/game-implementations/games/ddr.ts b/server/src/game-implementations/games/ddr.ts index c304c8898..5a89c557e 100644 --- a/server/src/game-implementations/games/ddr.ts +++ b/server/src/game-implementations/games/ddr.ts @@ -358,13 +358,9 @@ export const DDR_IMPL: GPTServerImplementation<"ddr:DP" | "ddr:SP"> = { return DDRFlare.calculate(chart.levelNum, flareLevel); }, - exScore: (scoreData) => { - return scoreData.optional.exScore ?? 0; - }, }, scoreValidators: DDR_SCORE_VALIDATORS, sessionCalcs: { flareSkill: SessionAvgBest10For("flareSkill"), - exScore: SessionAvgBest10For("exScore"), }, };