diff --git a/server/src/lib/constants/ea3id.ts b/server/src/lib/constants/ea3id.ts index 82dcf9624..aeba8a709 100644 --- a/server/src/lib/constants/ea3id.ts +++ b/server/src/lib/constants/ea3id.ts @@ -12,4 +12,7 @@ export const EXT_HEROIC_VERSE = "2020092900"; export const EXT_BISTROVER = "2021091500"; export const EXT_CASTHOUR = "2022082400"; +// first datecode of many, probably +export const EXT_RESIDENT = ["2022103100"]; + export const MODEL_SDVX3_KONASTE = "QCV"; diff --git a/server/src/lib/score-import/import-types/ir/fervidex/parser.ts b/server/src/lib/score-import/import-types/ir/fervidex/parser.ts index 8fea3d7ae..b6971dcbf 100644 --- a/server/src/lib/score-import/import-types/ir/fervidex/parser.ts +++ b/server/src/lib/score-import/import-types/ir/fervidex/parser.ts @@ -3,6 +3,7 @@ import { EXT_BISTROVER, EXT_CASTHOUR, EXT_HEROIC_VERSE, + EXT_RESIDENT, MODEL_IIDX, MODEL_IIDX_LIGHTNING, MODEL_INFINITAS_2, @@ -17,6 +18,7 @@ import type { ParserFunctionReturns } from "../../common/types"; import type { FerHeaders as FervidexHeaders, FervidexContext, FervidexScore } from "./types"; import type { KtLogger } from "lib/logger/logger"; import type { PrudenceSchema, ValidSchemaValue } from "prudence"; +import type { GPTSupportedVersions } from "tachi-common"; const PR_FERVIDEX: PrudenceSchema = { chart: p.isIn("spb", "spn", "dpn", "sph", "dph", "spa", "dpa", "spl", "dpl"), @@ -73,7 +75,10 @@ const PR_FERVIDEX: PrudenceSchema = { * Converts a string of the form LDJ:X:X:X:2020092900 into a game version. * I don't really understand the software model format, so this is lazy. */ -export function SoftwareIDToVersion(model: string, logger: KtLogger) { +export function SoftwareIDToVersion( + model: string, + logger: KtLogger +): GPTSupportedVersions["iidx:DP" | "iidx:SP"] { try { const data = ParseEA3SoftID(model); @@ -104,6 +109,10 @@ export function SoftwareIDToVersion(model: string, logger: KtLogger) { } else if (data.rev === REV_OMNIMIX) { return "29-omni"; } + } else if (EXT_RESIDENT.includes(data.ext)) { + if (data.rev === REV_NORMAL) { + return "30"; + } } } diff --git a/server/src/server/router/ir/fervidex/router.ts b/server/src/server/router/ir/fervidex/router.ts index 70cb6bd7c..4383cd287 100644 --- a/server/src/server/router/ir/fervidex/router.ts +++ b/server/src/server/router/ir/fervidex/router.ts @@ -1,12 +1,6 @@ import { Router } from "express"; import db from "external/mongo/db"; -import { - EXT_BISTROVER, - EXT_CASTHOUR, - EXT_HEROIC_VERSE, - MODEL_INFINITAS_2, - REV_2DXBMS, -} from "lib/constants/ea3id"; +import { MODEL_INFINITAS_2, REV_2DXBMS } from "lib/constants/ea3id"; import { SYMBOL_TACHI_API_AUTH } from "lib/constants/tachi"; import CreateLogCtx from "lib/logger/logger"; import { ExpressWrappedScoreImportMain } from "lib/score-import/framework/express-wrapper"; @@ -74,8 +68,6 @@ const ValidateFervidexHeader: RequestHandler = (req, res, next) => { next(); }; -const supportedExts = [EXT_HEROIC_VERSE, EXT_BISTROVER, EXT_CASTHOUR]; - const ValidateModelHeader: RequestHandler = (req, res, next) => { const swModel = req.header("X-Software-Model");