feat: add itgChartHash support to batch-manual

This commit is contained in:
zkldi
2022-06-12 20:44:42 +01:00
parent efab17a015
commit c4b0e29e37
2 changed files with 11 additions and 1 deletions
@@ -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"
+6
View File
@@ -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.