fix bug in format difficulty

This commit is contained in:
zkldi
2021-08-17 20:59:22 +01:00
parent d8d7ff5e5f
commit d1c7860af3
+1 -9
View File
@@ -8,15 +8,11 @@ export function FormatInt(v: number): string {
export function FormatDifficulty(chart: ChartDocument, game: Game): string {
const gameConfig = GetGameConfig(game);
if (game === "bms") {
return `${chart.playtype} ${chart.level}`;
}
if (gameConfig.validPlaytypes.length > 1) {
return `${chart.playtype} ${chart.difficulty} ${chart.level}`;
}
return `${chart.difficulty}`;
return `${chart.difficulty} ${chart.level}`;
}
/**
@@ -28,10 +24,6 @@ export function FormatDifficultyShort(chart: ChartDocument, game: Game): string
const gptConfig = GetGamePTConfig(game, chart.playtype);
const shortDiff = gptConfig.shortDifficulties[chart.difficulty] ?? chart.difficulty;
if (game === "bms") {
return `${chart.playtype} ${chart.level}`;
}
if (game === "ddr") {
return `${shortDiff}${chart.playtype}`;
}