mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 16:58:25 +03:00
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:
@@ -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 />
|
||||
|
||||
@@ -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")} />
|
||||
|
||||
Reference in New Issue
Block a user