fix: take gauge from gaugeHistory in CG IIDX API converter (#1719)

This commit is contained in:
GRIM657
2026-07-17 22:09:58 +01:00
committed by GitHub
parent 0ff56397c0
commit 39bf4dd0a0
2 changed files with 5 additions and 1 deletions
@@ -126,6 +126,7 @@ describe("ConverterAPICGIIDX", () => {
},
optional: {
bp: 8,
gauge: 100,
gaugeHistory: [
22, 22, 22, 22, 22, 22, 23.56, 25.64, 27.72, 30.84, 33.44, 36.04, 37.68,
41.32, 43.92, 46.52, 48.08, 49.64, 51.2, 52.24, 54.32, 55.36, 57.44, 60.04,
@@ -60,6 +60,8 @@ export const ConverterAPICGIIDX: ConverterFunction<CGIIDXScore, CGContext> = asy
throw new InternalFailure(`Song-Chart desync with song ID ${chart.song.id} (iidx).`);
}
const gaugeHistory = ConvertGhostGauge(data.ghostGauge);
const dryScore: DryScore<"iidx-dp" | "iidx-sp"> = {
comment: null,
game: game,
@@ -75,7 +77,8 @@ export const ConverterAPICGIIDX: ConverterFunction<CGIIDXScore, CGContext> = asy
},
optional: {
bp: data.missCount,
gaugeHistory: ConvertGhostGauge(data.ghostGauge),
gauge: gaugeHistory ? gaugeHistory[gaugeHistory.length - 1] : undefined,
gaugeHistory: gaugeHistory,
},
},
scoreMeta: ConvertOptions(data),