mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-14 01:59:05 +03:00
fix: important flarescore fix; optional enumIndexes have been broken for 4 years
This commit is contained in:
@@ -342,6 +342,24 @@ export const DDR_IMPL: GameImplementation<DDRGames> = {
|
||||
base.scoreData.optional.exScore = score.scoreData.optional.exScore;
|
||||
},
|
||||
),
|
||||
CreatePBMergeFor(
|
||||
"largest",
|
||||
{
|
||||
type: "REGULAR",
|
||||
metric: "flare",
|
||||
},
|
||||
"Best Flare",
|
||||
(base, score) => {
|
||||
base.scoreData.optional.flare =
|
||||
score.scoreData.lamp !== "FAILED"
|
||||
? score.scoreData.optional.flare
|
||||
: base.scoreData.optional.flare;
|
||||
base.calculatedData.flareSkill =
|
||||
score.scoreData.lamp !== "FAILED"
|
||||
? score.calculatedData.flareSkill
|
||||
: base.calculatedData.flareSkill;
|
||||
},
|
||||
),
|
||||
],
|
||||
sessionCalcs: (arr) => ({
|
||||
flareSkill: SessionAvgBest10For("flareSkill")(arr),
|
||||
|
||||
@@ -60,10 +60,7 @@ export function CreateEnumIndexes<TGame extends V3Game>(game: TGame, metrics: an
|
||||
indexes[key] = index;
|
||||
}
|
||||
|
||||
for (const [key, conf] of [
|
||||
...Object.entries(gameConfig.providedMetrics),
|
||||
...Object.entries(gameConfig.derivedMetrics),
|
||||
]) {
|
||||
for (const [key, conf] of Object.entries(gameConfig.optionalMetrics)) {
|
||||
if (conf.type !== "ENUM") {
|
||||
continue;
|
||||
}
|
||||
@@ -86,7 +83,7 @@ export function CreateEnumIndexes<TGame extends V3Game>(game: TGame, metrics: an
|
||||
);
|
||||
}
|
||||
|
||||
indexes[key] = index;
|
||||
optionalIndexes[key] = index;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user