show all modifiers now
This commit is contained in:
parent
d2be3d833b
commit
670f2047a0
@ -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",
|
||||
}
|
||||
|
@ -57,18 +57,35 @@ const badges: ScoreBadge[] = [
|
||||
}
|
||||
|
||||
const failed = score.modifiers.includes("No Fail" as Modifier);
|
||||
const modCount = score.modifiers.length;
|
||||
return (
|
||||
<>
|
||||
<Tooltip
|
||||
display={
|
||||
<div className="flex flex-col gap-2">
|
||||
<div>
|
||||
<p>{accDetails}</p>
|
||||
{failed && <p className="text-red-500">Failed</p>}
|
||||
</div>
|
||||
|
||||
{modCount > 0 && (
|
||||
<div>
|
||||
<p className="font-semibold">Modifiers</p>
|
||||
<p>{score.modifiers.join(", ")}</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<p className="cursor-default">
|
||||
{acc.toFixed(2)}% {failed && <span>NF</span>}
|
||||
{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("")}`
|
||||
: ""}
|
||||
</p>
|
||||
</Tooltip>
|
||||
</>
|
||||
|
Reference in New Issue
Block a user