mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-02 20:08:17 +03:00
fix: iidx stuff for real probably
This commit is contained in:
@@ -82,7 +82,7 @@ const BASE_IMPL: GPTClientImplementation<GPTStrings["bms" | "pms"]> = {
|
||||
|
||||
// i don't know if this is correct
|
||||
// it's just really hard to work out.
|
||||
return Math.floor(v).toFixed(0);
|
||||
return Math.round(v).toFixed(0);
|
||||
}}
|
||||
/>
|
||||
<BMSOrPMSLampCell score={sc} />
|
||||
|
||||
@@ -106,7 +106,7 @@ const IIDXCoreCells: GPTClientImplementation<GPTStrings["iidx"]>["scoreCoreCells
|
||||
|
||||
// i don't know if this is correct
|
||||
// it's just really hard to work out.
|
||||
return Math.floor(v).toFixed(0);
|
||||
return Math.round(v).toFixed(0);
|
||||
}}
|
||||
/>
|
||||
<IIDXLampCell sc={sc} chart={chart} />
|
||||
|
||||
@@ -2,7 +2,7 @@ import { IIDX_DP_IMPL, IIDX_SP_IMPL } from "./iidx";
|
||||
import db from "external/mongo/db";
|
||||
import CreateLogCtx from "lib/logger/logger";
|
||||
import { CreatePBDoc } from "lib/score-import/framework/pb/create-pb-doc";
|
||||
import { IIDX_GRADES, IIDX_LAMPS } from "tachi-common";
|
||||
import { GetGrade, IIDXLIKE_GBOUNDARIES, IIDX_GRADES, IIDX_LAMPS } from "tachi-common";
|
||||
import t from "tap";
|
||||
import { dmf, mkFakePBIIDXSP, mkFakeScoreIIDXSP } from "test-utils/misc";
|
||||
import ResetDBState from "test-utils/resets";
|
||||
@@ -360,6 +360,19 @@ t.test("IIDX Implementation", (t) => {
|
||||
IIDX_LAMPS.HARD_CLEAR,
|
||||
"HARD CLEAR"
|
||||
);
|
||||
f(
|
||||
"grade",
|
||||
{ score: 1899, percent: (100 * 1899) / 1918, grade: "MAX-" },
|
||||
IIDX_GRADES.MAX,
|
||||
"MAX-19"
|
||||
);
|
||||
|
||||
f(
|
||||
"grade",
|
||||
{ score: 2831, percent: (100 * 2831) / 3546, grade: "AA" },
|
||||
IIDX_GRADES.AA,
|
||||
"AA+73"
|
||||
);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user