use chart.lntype to sniff lntype instead of score.lntype

This commit is contained in:
zkldi
2021-11-23 09:53:27 +00:00
parent 47c335f977
commit fadc0e70e9
3 changed files with 5 additions and 1 deletions
@@ -97,7 +97,9 @@ export const ConverterIRBeatoraja: ConverterFunction<BeatorajaScore, BeatorajaCo
importType,
logger
) => {
if (data.lntype !== 0) {
// ALWAYS USE CHART.LNTYPE, NOT DATA.LNTYPE!
// beatoraja has a bug where IRScore LNTypes are always set to 0.
if (context.chart.lntype !== 0) {
throw new InvalidScoreFailure("CN or HCN mode is not supported by this IR.");
}
@@ -53,6 +53,7 @@ const PR_BeatorajaChart = {
artist: "string",
subartist: "string",
total: p.isPositive,
lntype: p.isIn(-1, 0, 1, 2),
// currently only accepted playtypes.
mode: p.isIn("BEAT_7K", "BEAT_14K"),
@@ -21,6 +21,7 @@ export interface BeatorajaChart {
notes: integer;
hasRandom: boolean;
hasUndefinedLN: boolean;
lntype: -1 | 0 | 1 | 2;
}
export interface BeatorajaScore {