This commit is contained in:
zkldi
2021-06-09 14:19:55 +01:00
parent 4399cc8318
commit b6188deb64
2 changed files with 9 additions and 2 deletions
@@ -104,6 +104,12 @@ export const ConverterIRBeatoraja: ConverterFunction<BeatorajaScore, BeatorajaCo
};
}
let random = null;
if (chart.playtype === "7K") {
random = RANDOM_LOOKUP[data.option];
}
const lamp = LAMP_LOOKUP[data.clear];
const dryScore: DryScore<"bms:7K" | "bms:14K"> = {
@@ -121,7 +127,7 @@ export const ConverterIRBeatoraja: ConverterFunction<BeatorajaScore, BeatorajaCo
scoreMeta: {
client: context.client,
inputDevice: data.deviceType,
random: RANDOM_LOOKUP[data.option] ?? null,
random,
},
timeAchieved: Date.now(),
service: "Beatoraja IR",
@@ -102,7 +102,8 @@ function TachiScoreDataToBeatorajaFormat(
let rajaRandom = 0 as const;
// @todo #138 Investigate how beatoraja handles DP randoms - for now, we just skip them.
// Beatoraja does not support DP randoms - it only stores them in replay files,
// and only sends the left hand random here.
if (pbScore.playtype === "7K") {
if (random) {
// @ts-expect-error Invalid indexing because playtype removes the random tuple.