mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 16:58:25 +03:00
checkpoint
This commit is contained in:
@@ -27,6 +27,8 @@ import type {
|
||||
SessionRatingAlgorithms,
|
||||
SongDocumentData,
|
||||
UserAuthLevels,
|
||||
V3Game,
|
||||
V3GameToGPTString,
|
||||
Versions,
|
||||
} from "../types";
|
||||
import type { APIPermissions } from "./api";
|
||||
@@ -442,7 +444,10 @@ export type QuestSubscriptionDocument = {
|
||||
}
|
||||
);
|
||||
|
||||
export type ScoreData<GPT extends GPTString = GPTString> = {
|
||||
export type PgScoreData<Game extends V3Game = V3Game> = ProvidedMetrics[V3GameToGPTString[Game]] &
|
||||
DerivedMetrics[V3GameToGPTString[Game]];
|
||||
|
||||
export type MongoScoreData<GPT extends GPTString = GPTString> = {
|
||||
enumIndexes: ScoreEnumIndexes<GPT>;
|
||||
judgements: Partial<Record<Judgements[GPT], integer | null>>;
|
||||
optional: {
|
||||
@@ -456,7 +461,7 @@ export interface ScoreDocument<GPT extends GPTString = GPTString> {
|
||||
game: GPTStringToGame[GPT];
|
||||
playtype: GPTStringToPlaytype[GPT];
|
||||
userID: integer;
|
||||
scoreData: ScoreData<GPT>;
|
||||
scoreData: MongoScoreData<GPT>;
|
||||
scoreMeta: Partial<ScoreMeta[GPT]>;
|
||||
calculatedData: Partial<Record<ScoreRatingAlgorithms[GPT], number | null>>;
|
||||
timeAchieved: integer | null;
|
||||
@@ -496,7 +501,7 @@ export interface PBScoreDocument<GPT extends GPTString = GPTString> {
|
||||
highlight: boolean;
|
||||
isPrimary: boolean;
|
||||
timeAchieved: number | null;
|
||||
scoreData: ScoreData<GPT>;
|
||||
scoreData: MongoScoreData<GPT>;
|
||||
calculatedData: Partial<Record<ScoreRatingAlgorithms[GPT], number | null>>;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,58 @@ export type V3Game =
|
||||
| "usc-keyboard"
|
||||
| "wacca";
|
||||
|
||||
export type V3GameToGPTString = {
|
||||
"iidx-sp": "iidx:SP";
|
||||
"iidx-dp": "iidx:DP";
|
||||
museca: "museca:Single";
|
||||
sdvx: "sdvx:Single";
|
||||
"bms-14k": "bms:14K";
|
||||
"bms-7k": "bms:7K";
|
||||
"gitadora-dora": "gitadora:Dora";
|
||||
"gitadora-gita": "gitadora:Gita";
|
||||
chunithm: "chunithm:Single";
|
||||
wacca: "wacca:Single";
|
||||
jubeat: "jubeat:Single";
|
||||
popn: "popn:9B";
|
||||
maimai: "maimai:Single";
|
||||
maimaidx: "maimaidx:Single";
|
||||
"pms-controller": "pms:Controller";
|
||||
"pms-keyboard": "pms:Keyboard";
|
||||
"usc-controller": "usc:Controller";
|
||||
"usc-keyboard": "usc:Keyboard";
|
||||
"itg-stamina": "itg:Stamina";
|
||||
arcaea: "arcaea:Touch";
|
||||
ongeki: "ongeki:Single";
|
||||
"ddr-sp": "ddr:SP";
|
||||
"ddr-dp": "ddr:DP";
|
||||
};
|
||||
|
||||
export type GPTStringToV3Game = {
|
||||
"iidx:SP": "iidx-sp";
|
||||
"iidx:DP": "iidx-dp";
|
||||
"museca:Single": "museca";
|
||||
"sdvx:Single": "sdvx";
|
||||
"bms:14K": "bms-14k";
|
||||
"bms:7K": "bms-7k";
|
||||
"gitadora:Dora": "gitadora-dora";
|
||||
"gitadora:Gita": "gitadora-gita";
|
||||
"chunithm:Single": "chunithm";
|
||||
"wacca:Single": "wacca";
|
||||
"jubeat:Single": "jubeat";
|
||||
"popn:9B": "popn";
|
||||
"maimai:Single": "maimai";
|
||||
"maimaidx:Single": "maimaidx";
|
||||
"pms:Controller": "pms-controller";
|
||||
"pms:Keyboard": "pms-keyboard";
|
||||
"usc:Controller": "usc-controller";
|
||||
"usc:Keyboard": "usc-keyboard";
|
||||
"itg:Stamina": "itg-stamina";
|
||||
"arcaea:Touch": "arcaea";
|
||||
"ongeki:Single": "ongeki";
|
||||
"ddr:SP": "ddr-sp";
|
||||
"ddr:DP": "ddr-dp";
|
||||
};
|
||||
|
||||
export type GPTStrings = {
|
||||
[G in GameGroup]: `${G}:${Playtypes[G]}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user