From d1c7860af336bce97b4a4374b3fbfeb0fe79c991 Mon Sep 17 00:00:00 2001 From: zkldi Date: Tue, 17 Aug 2021 20:59:22 +0100 Subject: [PATCH] fix bug in format difficulty --- common/src/utils/util.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/common/src/utils/util.ts b/common/src/utils/util.ts index bcb9135d9..b3c07f0a5 100644 --- a/common/src/utils/util.ts +++ b/common/src/utils/util.ts @@ -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}`; }