plugins/gitadora@asphyxia/models/scores.ts
Thome Valentin 1b6ab0085f Fixed note scroll speed defaulting to 0.5x for newly registered profiles.
Introduced several new interfaces, and refactored code to cleanup profiles.ts
2022-05-16 13:50:18 +02:00

36 lines
642 B
TypeScript

import { PLUGIN_VER } from "../const";
export interface Scores {
collection: 'scores';
game: 'gf' | 'dm';
version?: string;
pluginVer: number
scores: {
[mid: string]: {
update: number[];
diffs: {
[seq: string]: {
perc: number;
rank: number;
clear: boolean;
fc: boolean;
ex: boolean;
meter: string;
prog: number;
};
};
};
};
}
export function getDefaultScores (game: 'gf' | 'dm', version: string): Scores {
return {
collection: 'scores',
version,
pluginVer: PLUGIN_VER,
game,
scores: {}
}
};