mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-01 19:38:13 +03:00
Merge pull request #448 from TNG-dev:zkldi/issue-447-FER-static-is-still-expecting-a-max_combo-key-when-none-exists
Make FER Static honor undefined maxcmobos
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Lamps } from "tachi-common";
|
||||
import { DeleteUndefinedProps } from "utils/misc";
|
||||
import { FindChartOnInGameIDVersion } from "utils/queries/charts";
|
||||
import { FindSongOnID } from "utils/queries/songs";
|
||||
import {
|
||||
@@ -43,6 +44,12 @@ export const ConverterIRFervidexStatic: ConverterFunction<
|
||||
|
||||
const { percent, grade } = GenericGetGradeAndPercent("iidx", data.ex_score, chart);
|
||||
|
||||
const hitMeta: { bp?: number | null } = {};
|
||||
|
||||
if (data.miss_count !== undefined) {
|
||||
hitMeta.bp = data.miss_count === -1 ? null : data.miss_count;
|
||||
}
|
||||
|
||||
const dryScore: DryScore<"iidx:SP" | "iidx:DP"> = {
|
||||
game: "iidx",
|
||||
service: "Fervidex Static",
|
||||
@@ -55,9 +62,7 @@ export const ConverterIRFervidexStatic: ConverterFunction<
|
||||
grade,
|
||||
lamp: FERVIDEX_LAMP_LOOKUP[data.clear_type] as Lamps["iidx:SP" | "iidx:DP"],
|
||||
judgements: {},
|
||||
hitMeta: {
|
||||
bp: data.miss_count === -1 ? null : data.miss_count,
|
||||
},
|
||||
hitMeta,
|
||||
},
|
||||
scoreMeta: {},
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ import { FervidexStaticContext, FervidexStaticScore } from "./types";
|
||||
|
||||
const PR_FervidexStatic: PrudenceSchema = {
|
||||
ex_score: p.isPositiveInteger,
|
||||
miss_count: p.nullable(p.or(p.isPositiveInteger, p.is(-1))),
|
||||
miss_count: p.optional(p.nullable(p.or(p.isPositiveInteger, p.is(-1)))),
|
||||
clear_type: p.isBoundedInteger(0, 7),
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { GPTSupportedVersions, integer } from "tachi-common";
|
||||
export interface FervidexStaticScore {
|
||||
clear_type: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
||||
ex_score: integer;
|
||||
miss_count: integer | null; // bp, not cbrk
|
||||
miss_count?: integer | null; // bp, not cbrk
|
||||
chart: `${"sp" | "dp"}${"b" | "n" | "h" | "a" | "l"}`;
|
||||
song_id: integer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user