Add base flare support
Some checks are pending
Build / build (push) Waiting to run

This commit is contained in:
Trenton Zimmer
2026-07-14 17:04:54 -04:00
parent d65adfaf99
commit 19ea7c56c4
3 changed files with 87 additions and 0 deletions

View File

@@ -516,7 +516,11 @@ export const gameData = [
{ text: "Grade", value: "data.rank", width: 80 },
{ text: "Combos", value: "data.combo", width: 80 },
{ text: "Halo", value: "data.halo", width: 80 },
{ text: "FLARE", value: "data.flare", width: 80 },
],
// playerHeaders: [
// { text: "Flare Level", value: "flare", sortable: true, width: 120 },
// ],
chartTable: {
0: "SP BEGINNER",
1: "SP BASIC",
@@ -558,6 +562,65 @@ export const gameData = [
650: "AA+",
700: "AAA",
},
flareTable: {
1: "I",
2: "II",
3: "III",
4: "IV",
5: "V",
6: "VI",
7: "VII",
8: "VIII",
9: "IX",
10: "EX",
},
flareLevel: {
0: { label: "NONE" },
500: { label: "NONE+" },
1000: { label: "NONE++" },
1500: { label: "NONE+++" },
2000: { label: "MERCURY", color: "sky-700" },
3000: { label: "MERCURY+", color: "sky-700" },
4000: { label: "MERCURY++", color: "sky-600" },
5000: { label: "MERCURY+++", color: "sky-600" },
6000: { label: "VENUS", color: "yellow-500" },
7000: { label: "VENUS+", color: "yellow-500" },
8000: { label: "VENUS++", color: "yellow-600" },
9000: { label: "VENUS+++", color: "yellow-600" },
10000: { label: "EARTH", color: "emerald-500" },
11500: { label: "EARTH+", color: "emerald-500" },
13000: { label: "EARTH++", color: "emerald-600" },
14500: { label: "EARTH+++", color: "emerald-600" },
16000: { label: "MARS", color: "red-500" },
18000: { label: "MARS+", color: "red-500" },
20000: { label: "MARS++", color: "red-600" },
22000: { label: "MARS+++", color: "red-600" },
24000: { label: "JUPITER", color: "amber-400" },
26500: { label: "JUPITER+", color: "amber-400" },
29000: { label: "JUPITER++", color: "amber-500" },
31500: { label: "JUPITER+++", color: "amber-500" },
34000: { label: "SATURN", color: "rose-700" },
36750: { label: "SATURN+", color: "rose-700" },
39500: { label: "SATURN++", color: "rose-800" },
42250: { label: "SATURN+++", color: "rose-800" },
45000: { label: "URANUS", color: "cyan-400" },
48750: { label: "URANUS+", color: "cyan-400" },
52500: { label: "URANUS++", color: "cyan-300" },
56250: { label: "URANUS+++", color: "cyan-300" },
60000: { label: "NEPTUNE", color: "indigo-600" },
63750: { label: "NEPTUNE+", color: "indigo-600" },
67500: { label: "NEPTUNE++", color: "indigo-700" },
71250: { label: "NEPTUNE+++", color: "indigo-700" },
75000: { label: "SUN", color: "orange-400" },
78750: { label: "SUN+", color: "orange-400" },
82500: { label: "SUN++", color: "orange-500" },
86250: { label: "SUN+++", color: "orange-500" },
90000: {
label: "WORLD",
gradient:
"bg-linear-to-r from-orange-500 via-indigo-500 to-green-500 text-transparent bg-clip-text",
},
},
versions: [
{
id: VersionConstants.DDR_1ST_MIX,

View File

@@ -176,6 +176,14 @@ export function formatScoreTable(thisGame, scores) {
item.data.miss_count = 0;
}
if (item.data?.flare !== undefined && thisGame.flareTable !== undefined) {
if (item.data.flare <= 0) {
item.data.flare = "";
} else {
item.data.flare = thisGame.flareTable[item.data.flare];
}
}
if (item.points != undefined) {
item.points = item.points
.toString()

16
src/helpers/flare.js Normal file
View File

@@ -0,0 +1,16 @@
import { getGameInfo, GameConstants } from "@/constants";
export function getFlareLevel(score) {
const flareLevel = getGameInfo(GameConstants.DDR).flareLevel;
const threshold = Object.keys(flareLevel)
.map(Number)
.sort((a, b) => a - b)
.reduce((current, key) => (score >= key ? key : current), 0);
const level = flareLevel[threshold];
return {
label: level?.label,
color: level?.gradient ? level.gradient : level?.color,
textColor: level?.gradient ? level.gradient : `text-${level?.color}`,
};
}