mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-04 12:58:11 +03:00
Allow custom and chart_sha256 to be undefined.
This commit is contained in:
@@ -136,6 +136,9 @@ export const ConverterIRFervidex: ConverterFunction<FervidexScore, FervidexConte
|
||||
|
||||
let chart;
|
||||
if (data.custom) {
|
||||
if (!data.chart_sha256) {
|
||||
throw new InvalidScoreFailure("Score has no chart_sha256 but is a custom?");
|
||||
}
|
||||
chart = await FindIIDXChartWith2DXtraHash(data.chart_sha256);
|
||||
} else {
|
||||
chart = await FindIIDXChartOnInGameIDVersion(
|
||||
|
||||
@@ -17,8 +17,8 @@ import { FervidexContext, FervidexScore } from "./types";
|
||||
const PR_Fervidex: PrudenceSchema = {
|
||||
chart: p.isIn("spb", "spn", "dpn", "sph", "dph", "spa", "dpa", "spl", "dpl"),
|
||||
entry_id: p.isPositiveInteger,
|
||||
chart_sha256: "string",
|
||||
custom: "boolean",
|
||||
chart_sha256: "*string",
|
||||
custom: "*boolean",
|
||||
|
||||
pgreat: p.isPositiveInteger,
|
||||
great: p.isPositiveInteger,
|
||||
|
||||
@@ -4,9 +4,9 @@ export interface FervidexScore {
|
||||
chart: `${"sp" | "dp"}${"b" | "n" | "h" | "a" | "l"}`;
|
||||
|
||||
entry_id: integer;
|
||||
chart_sha256: string;
|
||||
chart_sha256?: string;
|
||||
// whether or whether not this chart is from 2dxtra
|
||||
custom: boolean;
|
||||
custom?: boolean;
|
||||
|
||||
pgreat: integer;
|
||||
great: integer;
|
||||
|
||||
Reference in New Issue
Block a user