mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-10 00:08:22 +03:00
feat: gitadora frontend
This commit is contained in:
@@ -4,7 +4,7 @@ import type { Grades, integer, PBScoreDocument } from "../types";
|
||||
import type { PrudenceError } from "prudence";
|
||||
|
||||
export function FormatInt(v: number): string {
|
||||
return v.toString();
|
||||
return Math.floor(v).toFixed(0);
|
||||
}
|
||||
|
||||
export function FormatDifficulty(chart: ChartDocument, game: Game): string {
|
||||
@@ -22,6 +22,15 @@ export function FormatDifficulty(chart: ChartDocument, game: Game): string {
|
||||
return `${itgChart.data.difficultyTag} ${itgChart.level}`;
|
||||
}
|
||||
|
||||
if (game === "gitadora") {
|
||||
const gptConfig = GetGamePTConfig(game, chart.playtype);
|
||||
|
||||
const shortDiff = gptConfig.shortDifficulties[chart.difficulty] ?? chart.difficulty;
|
||||
|
||||
// gitadora should always use short diffs. they just look better.
|
||||
return `${shortDiff} ${chart.level}`;
|
||||
}
|
||||
|
||||
const gameConfig = GetGameConfig(game);
|
||||
|
||||
if (gameConfig.validPlaytypes.length > 1) {
|
||||
|
||||
Reference in New Issue
Block a user