mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 00:38:28 +03:00
More file movement
This commit is contained in:
+2
@@ -1,4 +1,5 @@
|
||||
import { config, Game, Grades, IDStrings } from "kamaitachi-common";
|
||||
import { logger } from "../../../logger";
|
||||
|
||||
/**
|
||||
* Util for getting a games' grade for a given percent.
|
||||
@@ -18,5 +19,6 @@ export function GetGradeFromPercent<I extends IDStrings = IDStrings>(
|
||||
}
|
||||
}
|
||||
|
||||
// failsafe
|
||||
return null;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ export default async function HydrateScore(
|
||||
{
|
||||
// @todo lamps may need to be separate upon game:playtype someday. Maybe. We need to check this out
|
||||
lampIndex: config.lamps[dryScore.game].indexOf(dryScore.scoreData.lamp as string),
|
||||
gradeIndex: config.grades[dryScore.game].indexOf(dryScore.scoreData.lamp as string),
|
||||
gradeIndex: config.grades[dryScore.game].indexOf(dryScore.scoreData.grade as string),
|
||||
},
|
||||
dryScoreData
|
||||
);
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
InvalidScoreFailure,
|
||||
} from "../../../framework/importing/converter-failures";
|
||||
import ScoreImportFatalError from "../../../framework/importing/score-import-error";
|
||||
import { GetGradeFromPercent } from "../../../framework/importing/score-utils";
|
||||
import { GetGradeFromPercent } from "../../../framework/common/score-utils";
|
||||
import { AssertStrAsPositiveInt } from "../../../framework/common/string-asserts";
|
||||
import { EamusementScoreData, IIDXEamusementCSVContext, IIDXEamusementCSVData } from "./types";
|
||||
|
||||
@@ -107,6 +107,7 @@ export async function EamScoreConverter(
|
||||
const grade = GetGradeFromPercent<"iidx:SP" | "iidx:DP">("iidx", percent);
|
||||
|
||||
if (!grade) {
|
||||
logger.warn(`${HUMANISED_CHART_TITLE} - Could not resolve ${percent} into a grade?`);
|
||||
throw new InternalFailure(
|
||||
`${HUMANISED_CHART_TITLE} - Could not resolve ${percent} into a grade?`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user