mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-22 23:18:05 +03:00
fix: remove level from FormatDifficultySearch (#1652)
* fix: remove level from FormatDifficultySearch * nullable for a reason
This commit is contained in:
@@ -108,7 +108,22 @@ function FormatDifficultyInternal(chart: ChartDocument, short: boolean): string
|
||||
* Formats a chart's difficulty for searching, such as forwarding this query to youtube.
|
||||
*/
|
||||
export function FormatDifficultySearch(chart: ChartDocument): string | null {
|
||||
return FormatDifficultyLong(chart);
|
||||
const gameGroup = GameToGameGroup(chart.game);
|
||||
const gameConfig = GetGameConfig(chart.game);
|
||||
|
||||
if (["bms", "itg", "pms"].includes(gameGroup)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let diff: string | undefined;
|
||||
if (
|
||||
gameConfig.difficulties.type === "FIXED" ||
|
||||
gameConfig.difficulties.type === "CHUGEKIMAI_STYLE"
|
||||
) {
|
||||
diff = gameConfig.difficulties.formatLong[chart.difficulty];
|
||||
}
|
||||
diff ??= chart.difficulty;
|
||||
return diff.trim();
|
||||
}
|
||||
|
||||
export function FormatGame(game: V3Game): string {
|
||||
|
||||
Reference in New Issue
Block a user