mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 08:48:15 +03:00
feat: add itgChartHash support to batch-manual
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user