feat: gitadora frontend

This commit is contained in:
zkldi
2022-12-20 14:36:27 +00:00
parent 4d1714e2c2
commit e63cab2159
22 changed files with 187 additions and 94 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ const staticIndexes: Partial<Record<Databases, Array<Index>>> = {
"charts-sdvx": [index({ "data.inGameID": 1, difficulty: 1 })],
"charts-museca": [index({ "data.inGameID": 1, difficulty: 1 }, UNIQUE)],
"charts-chunithm": [index({ "data.inGameID": 1, difficulty: 1 }, UNIQUE)],
"charts-gitadora": [index({ "data.inGameID": 1, difficulty: 1 }, UNIQUE)],
"charts-gitadora": [index({ "data.inGameID": 1, difficulty: 1, playtype: 1 }, UNIQUE)],
"charts-wacca": [index({ isHot: 1 })],
"charts-usc": [index({ "data.hashSHA1": 1, playtype: 1 }, UNIQUE)],
"charts-jubeat": [index({ "data.inGameID": 1, difficulty: 1 }, UNIQUE)],
@@ -91,6 +91,9 @@ export function GenericCalculatePercent(game: Game, score: number, chart?: Chart
case "jubeat":
throw new Error(`Cannot calculate percent for jubeat. Music Rate must be provided.`);
// gitadora's score is just a percent
// this is a hack: we need a refactor for this.
case "gitadora":
case "itg":
return score;
@@ -362,7 +362,7 @@ export async function ResolveMatchTypeToKTData(
);
}
const identifier = data.identifier;
const identifier = Number(data.identifier);
const difficulty = AssertStrAsDifficulty(data.difficulty, game, context.playtype);
+2 -2
View File
@@ -10,7 +10,7 @@ import type {
integer,
Playtype,
UserDocument,
UGSRatingsLookup,
ProfileRatingLookup,
UserGameStats,
} from "tachi-common";
@@ -192,7 +192,7 @@ export async function GetAllRankings(stats: UserGameStats) {
export async function GetUsersRankingAndOutOf(
stats: UserGameStats,
alg?: UGSRatingsLookup[IDStrings]
alg?: ProfileRatingLookup[IDStrings]
) {
const gptConfig = GetGamePTConfig(stats.game, stats.playtype);