mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-12 09:18:25 +03:00
fix bug in format difficulty
This commit is contained in:
@@ -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}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user