diff --git a/server/src/lib/score-import/import-types/common/batch-manual/parser.ts b/server/src/lib/score-import/import-types/common/batch-manual/parser.ts index 93f6c136a..d5c919430 100644 --- a/server/src/lib/score-import/import-types/common/batch-manual/parser.ts +++ b/server/src/lib/score-import/import-types/common/batch-manual/parser.ts @@ -146,14 +146,18 @@ const PR_HIT_META = (game: Game): PrudenceSchema => { const PR_BATCH_MANUAL_SCORE = (game: Game, playtype: Playtype): PrudenceSchema => { const gptConfig = GetGamePTConfig(game, playtype); + const scoreChecker = + game === "itg" || game === "gitadora" ? p.isBetween(0, 100) : p.isPositiveInteger; + return { - score: p.isPositiveInteger, + score: scoreChecker, lamp: p.isIn(gptConfig.lamps), matchType: p.isIn( "songTitle", "ddrSongHash", "tachiSongID", "bmsChartHash", + "itgChartHash", "inGameID", "uscChartHash", "popnChartHash" diff --git a/server/src/utils/queries/charts.ts b/server/src/utils/queries/charts.ts index bee54a6f0..9c3ceabc7 100644 --- a/server/src/utils/queries/charts.ts +++ b/server/src/utils/queries/charts.ts @@ -85,6 +85,12 @@ export function FindDDRChartOnSongHash( }); } +export function FindITGChartOnHash(hash: string) { + return db.charts.itg.findOne({ + "data.chartHash": hash, + }); +} + /** * Find a BMS chart on either its md5sum or its sha256sum. * @param hash The md5 or sha256 hash to look for.