fix: use pms specific formatting for sieglinde

This commit is contained in:
zkldi
2022-04-16 00:51:12 +01:00
parent 8b193b4a47
commit 2b55657bc6
2 changed files with 23 additions and 14 deletions
+13 -13
View File
@@ -31,7 +31,7 @@ import {
JudgementLookup,
GPTSupportedVersions,
} from "../types";
import { FormatSieglinde } from "../utils/util";
import { FormatSieglindeBMS, FormatSieglindePMS } from "../utils/util";
export interface GameConfig<G extends Game = Game> {
internalName: string;
@@ -1085,13 +1085,13 @@ const GAME_PT_CONFIGS: GamePTConfigs = {
},
scoreRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindeBMS,
},
profileRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindeBMS,
},
sessionRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindeBMS,
},
difficulties: ["CHART"],
@@ -1197,13 +1197,13 @@ const GAME_PT_CONFIGS: GamePTConfigs = {
},
scoreRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindeBMS,
},
profileRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindeBMS,
},
sessionRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindeBMS,
},
difficulties: ["CHART"],
@@ -2120,13 +2120,13 @@ const GAME_PT_CONFIGS: GamePTConfigs = {
profileRatingAlgs: ["sieglinde"],
scoreRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindePMS,
},
profileRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindePMS,
},
sessionRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindePMS,
},
scoreRatingAlgDescriptions: {
@@ -2230,13 +2230,13 @@ const GAME_PT_CONFIGS: GamePTConfigs = {
profileRatingAlgs: ["sieglinde"],
scoreRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindePMS,
},
profileRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindePMS,
},
sessionRatingAlgFormatters: {
sieglinde: FormatSieglinde,
sieglinde: FormatSieglindePMS,
},
scoreRatingAlgDescriptions: {
+10 -1
View File
@@ -209,7 +209,7 @@ export function GenericFormatGradeDelta<I extends IDStrings = IDStrings>(
};
}
export function FormatSieglinde(sgl: number) {
export function FormatSieglindeBMS(sgl: number): string {
const fixedSgl = sgl.toFixed(2);
if (sgl < 13) {
return `${fixedSgl} (☆${fixedSgl})`;
@@ -217,3 +217,12 @@ export function FormatSieglinde(sgl: number) {
return `${fixedSgl} (🟊${(sgl - 12).toFixed(2)})`;
}
export function FormatSieglindePMS(sgl: number): string {
const fixedSgl = sgl.toFixed(2);
if (sgl < 13) {
return `${fixedSgl} (○${fixedSgl})`;
}
return `${fixedSgl} (●${(sgl - 12).toFixed(2)})`;
}