Skip to content

Commit 76d02e8

Browse files
authored
feat: always show score alg desc under profile alg desc (#1319)
* feat: always display score alg description * fix: typo
1 parent 131f4fe commit 76d02e8

File tree

21 files changed

+62
-21
lines changed

21 files changed

+62
-21
lines changed

client/src/components/user/UGPTStatsOverview.tsx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,25 @@ export default function UGPTRatingsTable({ ugs }: { ugs: UserGameStats }) {
5151
tooltipContent={
5252
<div>
5353
{gptConfig.profileRatingAlgs[k].description}
54-
{k in gptConfig.scoreRatingAlgs && (
54+
{(gptConfig.profileRatingAlgs[k].associatedScoreAlgs ?? [])
55+
.length > 0 && (
5556
<>
56-
<Divider />(
57-
{FormatGPTScoreRatingName(
58-
ugs.game,
59-
ugs.playtype,
60-
k
61-
)}
62-
: {gptConfig.scoreRatingAlgs[k].description})
57+
<Divider />
6358
</>
6459
)}
60+
{gptConfig.profileRatingAlgs[k].associatedScoreAlgs?.map(
61+
(alg) => (
62+
<div>
63+
(
64+
{FormatGPTScoreRatingName(
65+
ugs.game,
66+
ugs.playtype,
67+
alg
68+
)}
69+
: {gptConfig.scoreRatingAlgs[alg].description})
70+
</div>
71+
)
72+
)}
6573
</div>
6674
}
6775
wide

common/src/config/game-support/arcaea.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const ARCAEA_TOUCH_CONF = {
8787
description:
8888
"The average of your best 30 potential values. This is different to in-game, as it does not take into account your recent scores in any way.",
8989
formatter: ToDecimalPlaces(2),
90+
associatedScoreAlgs: ["potential"],
9091
},
9192
},
9293

common/src/config/game-support/bms.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ export const BMS_7K_CONF = {
311311
sieglinde: {
312312
description: "The average of your best 20 sieglinde ratings.",
313313
formatter: FormatSieglindeBMS,
314+
associatedScoreAlgs: ["sieglinde"],
314315
},
315316
},
316317

common/src/config/game-support/chunithm.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export const CHUNITHM_SINGLE_CONF = {
123123
naiveRating: {
124124
description: "The average of your best 50 ratings.",
125125
formatter: ToDecimalPlaces(2),
126+
associatedScoreAlgs: ["rating"],
126127
},
127128
},
128129

common/src/config/game-support/ddr.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export const DDR_SP_CONF = {
161161
description:
162162
"Flare Skill as it's implemented in DDR World, taking 30 best flare points from 3 different categories: CLASSIC (DDR 1st~X3 vs 2ndMIX), WHITE (DDR(2013)~DDR A), GOLD (DDR A20~WORLD).",
163163
formatter: FmtScoreNoCommas,
164+
associatedScoreAlgs: ["flareSkill"],
164165
},
165166
},
166167

common/src/config/game-support/gitadora.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export const GITADORA_GITA_CONF = {
7272
naiveSkill: {
7373
description:
7474
"Your best 50 skill levels added together, regardless of whether the chart is HOT or not.",
75+
associatedScoreAlgs: ["skill"],
7576
},
7677
},
7778

common/src/config/game-support/iidx.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,11 @@ export const IIDX_SP_CONF = {
171171
},
172172

173173
profileRatingAlgs: {
174-
ktLampRating: { description: `An average of your best 20 ktLampRatings.` },
175-
BPI: { description: `An average of your best 20 BPIs.` },
174+
ktLampRating: {
175+
description: `An average of your best 20 ktLampRatings.`,
176+
associatedScoreAlgs: ["ktLampRating"],
177+
},
178+
BPI: { description: `An average of your best 20 BPIs.`, associatedScoreAlgs: ["BPI"] },
176179
},
177180
sessionRatingAlgs: {
178181
ktLampRating: { description: `An average of the best 10 ktLampRatings this session.` },

common/src/config/game-support/itg.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,12 @@ export const ITG_STAMINA_CONF = {
112112
highestBlock: {
113113
description: "The highest block level this player has cleared.",
114114
formatter: NoDecimalPlace,
115+
associatedScoreAlgs: ["blockRating"],
115116
},
116117
fastest32: {
117118
description: "The fastest BPM this user has streamed 32 unbroken measures at.",
118119
formatter: NoDecimalPlace,
120+
associatedScoreAlgs: ["fastest32"],
119121
},
120122
},
121123

common/src/config/game-support/jubeat.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@ export const JUBEAT_SINGLE_CONF = {
7979
jubility: {
8080
description:
8181
"Your profile jubility. This takes your best 30 scores on PICK UP songs, and your best 30 elsewhere.",
82+
associatedScoreAlgs: ["jubility"],
8283
},
8384
naiveJubility: {
8485
description:
8586
"A naive version of jubility which just adds together your best 60 scores.",
87+
associatedScoreAlgs: ["jubility"],
8688
},
8789
},
8890

common/src/config/game-support/maimai-dx.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export const MAIMAI_DX_SINGLE_CONF = {
163163
naiveRate: {
164164
description: "A naive rating algorithm that just sums your 50 best scores.",
165165
formatter: NoDecimalPlace,
166+
associatedScoreAlgs: ["rate"],
166167
},
167168
},
168169

0 commit comments

Comments
 (0)