Skip to content

Commit

Permalink
fix: remove exScore from calculated metrics for DDR
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyoo committed Aug 27, 2024
1 parent 02071f0 commit 6281abf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
8 changes: 8 additions & 0 deletions client/src/components/tables/cells/DDRScoreCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -23,6 +25,12 @@ export default function DDRScoreCell({
<strong>{grade}</strong>
<br />
{score !== undefined && <>{scoreRenderFn ? scoreRenderFn(score) : score}</>}
{(!!exScore || exScore === 0) && (
<>
<br />
[EX: {exScore}]
</>
)}
</td>
);
}
11 changes: 1 addition & 10 deletions common/src/config/game-support/ddr.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -146,21 +145,13 @@ export const DDR_SP_CONF = {
description: "Flare Skill as it's implemented in DDR World.",
formatter: FmtScoreNoCommas,
},
exScore: {
description: "The EXScore.",
formatter: FmtScoreNoCommas,
},
},

sessionRatingAlgs: {
flareSkill: {
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: {
Expand Down
4 changes: 0 additions & 4 deletions server/src/game-implementations/games/ddr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
},
};

0 comments on commit 6281abf

Please sign in to comment.