fix(client): shorten maimai DX difficulties, display percent as 4dp (#1329)

* fix(client): shorten maimai DX difficulties, display percent as 4dp

* fix: default percentDp should be 2
This commit is contained in:
beerpsi
2025-07-15 19:30:17 +01:00
committed by GitHub
parent 3b1832328b
commit bc4df58984
3 changed files with 6 additions and 2 deletions
@@ -53,8 +53,9 @@ export default function DifficultyCell({
const gptImpl = GPT_CLIENT_IMPLEMENTATIONS[GetGPTString(game, chart.playtype)];
if (game === "iidx") {
if (game === "iidx" || game === "maimaidx") {
// IIDX stuff should always be in the form SPA/SPL to save space.
// For the same reason, maimai DX stuff should be using (DX) EXP/MAS/Re:MAS.
// All players know what this means.
// eslint-disable-next-line no-param-reassign
alwaysShort = true;
@@ -8,10 +8,12 @@ export default function ScoreCell({
colour,
grade,
percent,
percentDp = 2,
scoreRenderFn,
}: {
score?: integer;
percent: number;
percentDp?: integer;
grade: string;
colour: string;
showScore?: boolean;
@@ -25,7 +27,7 @@ export default function ScoreCell({
>
<strong>{grade}</strong>
<br />
{`${ToFixedFloor(percent, 2)}%`}
{`${ToFixedFloor(percent, percentDp)}%`}
{score !== undefined && (
<>
<br />
+1
View File
@@ -466,6 +466,7 @@ export const GPT_CLIENT_IMPLEMENTATIONS: GPTClientImplementations = {
colour={GetEnumColour(sc, "grade")}
grade={sc.scoreData.grade}
percent={sc.scoreData.percent}
percentDp={4}
/>
<MaimaiDXJudgementCell score={sc} />
<LampCell lamp={sc.scoreData.lamp} colour={GetEnumColour(sc, "lamp")} />