From bf7e7665257417be86e34fa4c8202b5059485a53 Mon Sep 17 00:00:00 2001 From: "GRIM.657" Date: Tue, 21 Nov 2023 14:09:20 -0600 Subject: [PATCH] coerce old scripted long ingameID to new in fervidex imports, keep old kamai chart ID --- database-seeds/collections/charts-iidx.json | 64 +++++++------------ .../ir/fervidex-static/converter.ts | 7 +- .../import-types/ir/fervidex/converter.ts | 7 +- 3 files changed, 34 insertions(+), 44 deletions(-) diff --git a/database-seeds/collections/charts-iidx.json b/database-seeds/collections/charts-iidx.json index 041b4ba8f..d075b178b 100755 --- a/database-seeds/collections/charts-iidx.json +++ b/database-seeds/collections/charts-iidx.json @@ -891188,46 +891188,6 @@ "30-omni" ] }, - { - "chartID": "5accdc65e12d57da5e954e748cd195aa86fd0ff9", - "data": { - "2dxtraSet": null, - "bpiCoefficient": null, - "exhcTier": { - "individualDifference": false, - "text": "EXH.7", - "value": 13.1 - }, - "hashSHA256": null, - "hcTier": { - "individualDifference": false, - "text": "12A", - "value": 12.9 - }, - "inGameID": 21201, - "kaidenAverage": null, - "ncTier": { - "individualDifference": false, - "text": "12A", - "value": 12.8 - }, - "notecount": 4459, - "worldRecord": null - }, - "difficulty": "ANOTHER", - "isPrimary": false, - "level": "12", - "levelNum": 12, - "playtype": "SP", - "songID": 1514, - "versions": [ - "27-omni", - "27-2dxtra", - "28-omni", - "28-2dxtra", - "29-omni" - ] - }, { "chartID": "b61490eb1db3dd7e2421915e25b504dfce4e8da9", "data": { @@ -1226507,13 +1226467,28 @@ ] }, { - "chartID": "44c099d922bd1b296def73c7d639d943f19a826b", + "chartID": "5accdc65e12d57da5e954e748cd195aa86fd0ff9", "data": { "2dxtraSet": null, "bpiCoefficient": null, + "exhcTier": { + "individualDifference": false, + "text": "EXH.7", + "value": 13.1 + }, "hashSHA256": null, + "hcTier": { + "individualDifference": false, + "text": "12A", + "value": 12.9 + }, "inGameID": 12250, "kaidenAverage": null, + "ncTier": { + "individualDifference": false, + "text": "12A", + "value": 12.8 + }, "notecount": 4459, "worldRecord": null }, @@ -1226524,7 +1226499,12 @@ "playtype": "SP", "songID": 1514, "versions": [ - "30-omni" + "30-omni", + "27-omni", + "27-2dxtra", + "28-omni", + "28-2dxtra", + "29-omni" ] }, { diff --git a/server/src/lib/score-import/import-types/ir/fervidex-static/converter.ts b/server/src/lib/score-import/import-types/ir/fervidex-static/converter.ts index 350926b7b..14335b5da 100644 --- a/server/src/lib/score-import/import-types/ir/fervidex-static/converter.ts +++ b/server/src/lib/score-import/import-types/ir/fervidex-static/converter.ts @@ -13,7 +13,12 @@ export const ConverterIRFervidexStatic: ConverterFunction< FervidexStaticScore, FervidexStaticContext > = async (data, context, importType, logger) => { - const { difficulty, playtype } = SplitFervidexChartRef(data.chart); + let { difficulty, playtype } = SplitFervidexChartRef(data.chart); + + if(data.entry_id === 21201 && difficulty === "ANOTHER") { + data.entry_id = 12250; + difficulty = "LEGGENDARIA"; + } const chart = await FindChartOnInGameIDVersion( "iidx", diff --git a/server/src/lib/score-import/import-types/ir/fervidex/converter.ts b/server/src/lib/score-import/import-types/ir/fervidex/converter.ts index 5882a3b65..1596157b9 100644 --- a/server/src/lib/score-import/import-types/ir/fervidex/converter.ts +++ b/server/src/lib/score-import/import-types/ir/fervidex/converter.ts @@ -145,7 +145,12 @@ export const ConverterIRFervidex: ConverterFunction { - const { difficulty, playtype } = SplitFervidexChartRef(data.chart); + let { difficulty, playtype } = SplitFervidexChartRef(data.chart); + + if(data.entry_id === 21201 && difficulty === "ANOTHER") { + data.entry_id = 12250; + difficulty = "LEGGENDARIA"; + } let chart;