From 670f2047a0878ae07408f84fed0ed1dd38806bf9 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 19 Oct 2024 15:12:06 +0100 Subject: [PATCH] show all modifiers now --- projects/common/src/score/modifier.ts | 11 ++++---- .../src/components/score/score-stats.tsx | 25 ++++++++++++++++--- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/projects/common/src/score/modifier.ts b/projects/common/src/score/modifier.ts index a600a2b..0874aab 100644 --- a/projects/common/src/score/modifier.ts +++ b/projects/common/src/score/modifier.ts @@ -2,19 +2,18 @@ * The score modifiers. */ export enum Modifier { - DA = "Disappearing Arrows", + NF = "No Fail", + PM = "Pro Mode", FS = "Faster Song", SF = "Super Fast Song", SS = "Slower Song", GN = "Ghost Notes", - NA = "No Arrows", - NO = "No Obstacles", + DA = "Disappearing Arrows", SA = "Strict Angles", SC = "Small Notes", - PM = "Pro Mode", - CS = "Fail on Saber Clash", IF = "One Life", + NO = "No Obstacles", BE = "Battery Energy", - NF = "No Fail", NB = "No Bombs", + NA = "No Arrows", } diff --git a/projects/website/src/components/score/score-stats.tsx b/projects/website/src/components/score/score-stats.tsx index fd687c3..4fe0147 100644 --- a/projects/website/src/components/score/score-stats.tsx +++ b/projects/website/src/components/score/score-stats.tsx @@ -57,18 +57,35 @@ const badges: ScoreBadge[] = [ } const failed = score.modifiers.includes("No Fail" as Modifier); + const modCount = score.modifiers.length; return ( <> -

{accDetails}

- {failed &&

Failed

} +
+
+

{accDetails}

+ {failed &&

Failed

} +
+ + {modCount > 0 && ( +
+

Modifiers

+

{score.modifiers.join(", ")}

+
+ )}
} >

- {acc.toFixed(2)}% {failed && NF} + {acc.toFixed(2)}% + {modCount > 0 + ? ` ${Object.entries(Modifier) + .filter(mod => score.modifiers.includes(mod[1] as Modifier)) + .map(mod => mod[0]) + .splice(0, Object.entries(Modifier).length - 1) + .join("")}` + : ""}