mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-01 03:18:06 +03:00
Merge pull request #462 from TNG-dev/zkldi/issue-449-Update-USC-IR-version
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import db from "external/mongo/db";
|
||||
import { KtLogger } from "lib/logger/logger";
|
||||
import { ScoreImportJob, ScoreImportProgress } from "lib/score-import/worker/types";
|
||||
import { ScoreImportJob } from "lib/score-import/worker/types";
|
||||
import {
|
||||
Game,
|
||||
IDStrings,
|
||||
|
||||
@@ -122,6 +122,7 @@ export const ConverterIRUSC: ConverterFunction<USCClientScore, IRUSCContext> = a
|
||||
gauge: data.gauge,
|
||||
fast: data.early,
|
||||
slow: data.late,
|
||||
maxCombo: data.combo,
|
||||
},
|
||||
},
|
||||
scoreMeta: {
|
||||
|
||||
@@ -16,6 +16,7 @@ const PR_USCIRScore: PrudenceSchema = {
|
||||
error: p.isPositiveInteger,
|
||||
early: p.optional(p.isPositiveInteger),
|
||||
late: p.optional(p.isPositiveInteger),
|
||||
combo: p.optional(p.isPositiveInteger),
|
||||
options: {
|
||||
gaugeType: p.isIn(0, 1),
|
||||
mirror: "boolean",
|
||||
@@ -51,8 +52,11 @@ export function ParseIRUSC(
|
||||
const score = body.score as USCClientScore;
|
||||
|
||||
// Enforce null for this instead of undefined.
|
||||
// This is because FJSH cannot handle undefined properly.
|
||||
// Maybe fjsh should handle that, lol...
|
||||
score.early ??= null;
|
||||
score.late ??= null;
|
||||
score.combo ??= null;
|
||||
|
||||
return {
|
||||
context: {
|
||||
|
||||
@@ -22,6 +22,7 @@ export interface USCClientScore {
|
||||
error: integer;
|
||||
early: integer | null;
|
||||
late: integer | null;
|
||||
combo: integer | null;
|
||||
options: {
|
||||
gaugeType: 0 | 1;
|
||||
gaugeOpt: integer;
|
||||
|
||||
@@ -228,6 +228,7 @@ export const uscScore: USCClientScore = {
|
||||
gauge: 0.8,
|
||||
early: 50,
|
||||
late: 20,
|
||||
combo: 5,
|
||||
options: {
|
||||
autoFlags: 0,
|
||||
gaugeOpt: 0,
|
||||
|
||||
Reference in New Issue
Block a user