mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-04 04:48:15 +03:00
feat: last mmdx touches
This commit is contained in:
@@ -58,7 +58,8 @@ export default function GPTChartPage({
|
||||
setActiveChart: SetState<ChartDocument | null>;
|
||||
allCharts: ChartDocument[];
|
||||
} & GamePT) {
|
||||
const { difficulty } = useParams<{ difficulty: string }>();
|
||||
const { difficulty: d } = useParams<{ difficulty: string }>();
|
||||
const difficulty = decodeURIComponent(d);
|
||||
|
||||
const gptConfig = GetGamePTConfig(game, playtype);
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ const GPT_UTILS: Record<IDStrings, Array<GPTUtility>> = {
|
||||
"usc:Controller": [],
|
||||
"usc:Keyboard": [],
|
||||
"wacca:Single": [],
|
||||
"maimaidx:Single": [],
|
||||
};
|
||||
|
||||
export function GetGPTUtils(game: Game, playtype: Playtype) {
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import { IsNullish } from "util/misc";
|
||||
import React from "react";
|
||||
import { COLOUR_SET, PBScoreDocument, ScoreDocument } from "tachi-common";
|
||||
|
||||
export default function GitadoraJudgementCell({
|
||||
score,
|
||||
}: {
|
||||
score:
|
||||
| ScoreDocument<"gitadora:Dora" | "gitadora:Gita">
|
||||
| PBScoreDocument<"gitadora:Dora" | "gitadora:Gita">;
|
||||
}) {
|
||||
const judgements = score.scoreData.judgements;
|
||||
|
||||
if (
|
||||
IsNullish(judgements.perfect) ||
|
||||
IsNullish(judgements.great) ||
|
||||
IsNullish(judgements.good) ||
|
||||
IsNullish(judgements.ok) ||
|
||||
IsNullish(judgements.miss)
|
||||
) {
|
||||
return <td>No Data.</td>;
|
||||
}
|
||||
|
||||
return (
|
||||
<td>
|
||||
<strong>
|
||||
<span style={{ color: COLOUR_SET.gold }}>{judgements.perfect}</span>-
|
||||
<span style={{ color: COLOUR_SET.green }}>{judgements.great}</span>-
|
||||
<span style={{ color: COLOUR_SET.blue }}>{judgements.good}</span>-
|
||||
<span style={{ color: COLOUR_SET.purple }}>{judgements.ok}</span>-
|
||||
<span style={{ color: COLOUR_SET.red }}>{judgements.miss}</span>
|
||||
</strong>
|
||||
</td>
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import React from "react";
|
||||
import { IDStrings, ScoreCalculatedDataLookup, ScoreDocument } from "tachi-common";
|
||||
import LampCell from "../cells/LampCell";
|
||||
import RatingCell from "../cells/RatingCell";
|
||||
import ScoreCell from "../cells/ScoreCell";
|
||||
|
||||
export default function GenericCoreCells({
|
||||
sc,
|
||||
showScore,
|
||||
rating,
|
||||
}: {
|
||||
sc: ScoreDocument;
|
||||
showScore?: boolean;
|
||||
rating: ScoreCalculatedDataLookup[IDStrings];
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<ScoreCell score={sc} showScore={showScore} />
|
||||
<LampCell score={sc} />
|
||||
<RatingCell score={sc} rating={rating} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import React from "react";
|
||||
import { PBScoreDocument, ScoreDocument } from "tachi-common";
|
||||
import LampCell from "../cells/LampCell";
|
||||
import RatingCell from "../cells/RatingCell";
|
||||
import ScoreCell from "../cells/ScoreCell";
|
||||
import MaimaiDXJudgementCell from "../cells/MaimaiDXJudgementCell";
|
||||
|
||||
export default function MaimaiDXCoreCells({
|
||||
sc,
|
||||
rating,
|
||||
}: {
|
||||
sc: ScoreDocument<"maimaidx:Single"> | PBScoreDocument<"maimaidx:Single">;
|
||||
rating: keyof ScoreDocument["calculatedData"];
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<ScoreCell showScore={false} score={sc} />
|
||||
<MaimaiDXJudgementCell score={sc} />
|
||||
<LampCell score={sc} />
|
||||
<RatingCell score={sc} rating={rating} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
} from "tachi-common";
|
||||
import BMSCoreCells from "./BMSCoreCells";
|
||||
import CHUNITHMCoreCells from "./CHUNITHMCoreCells";
|
||||
import GenericCoreCells from "./GenericCoreCells";
|
||||
import IIDXCoreCells from "./IIDXCoreCells";
|
||||
import ITGCoreCells from "./ITGCoreCells";
|
||||
import JubeatCoreCells from "./JubeatCoreCells";
|
||||
@@ -19,6 +18,7 @@ import PopnCoreCells from "./PopnCoreCells";
|
||||
import SDVXScoreCoreCells from "./SDVXCoreCells";
|
||||
import WACCACoreCells from "./WACCACoreCells";
|
||||
import GitadoraCoreCells from "./GitadoraCoreCells";
|
||||
import MaimaiDXCoreCells from "./MaimaiDXCoreCells";
|
||||
|
||||
export default function ScoreCoreCells({
|
||||
game,
|
||||
@@ -30,7 +30,7 @@ export default function ScoreCoreCells({
|
||||
chart: ChartDocument;
|
||||
rating: ScoreCalculatedDataLookup[IDStrings];
|
||||
game: Game;
|
||||
}) {
|
||||
}): React.ReactChild {
|
||||
const sc = score as any; // lazy hack
|
||||
|
||||
switch (game) {
|
||||
@@ -70,5 +70,7 @@ export default function ScoreCoreCells({
|
||||
return <PMSCoreCells sc={sc} rating={rating} />;
|
||||
case "itg":
|
||||
return <ITGCoreCells sc={sc} rating={rating} />;
|
||||
case "maimaidx":
|
||||
return <MaimaiDXCoreCells sc={sc} rating={rating} />;
|
||||
}
|
||||
}
|
||||
|
||||
+50330
-50330
File diff suppressed because it is too large
Load Diff
@@ -22233,6 +22233,305 @@
|
||||
"title": "Level 9.9 (Qubell)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "1",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F0fbdcae40c32aa7cd9a3cbb94ca1682e9e64f2c92c637be1c650e2572492f675",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 1 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "10",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F7a4d2b540e5d572644a558738ac11f8520d3b70fee2479443b7c92b72c61cc46",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 10 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "10+",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F25f7c9177235d7b06c8f250900b21119091163ae5babeef6162a87cc8bc417fe",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 10+ (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "11",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F6219546c53513f346a871326397951b48fd9153fed40d64d9c02cdc1dc437357",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 11 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "11+",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F27e9c507738e00794a33f624159b83594022ab7cb1bfb8054a3eb6a85b4f6139",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 11+ (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "12",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F85014701324320462539482506091a04b72652869bc1b2d92c451c109813d9c8",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 12 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "12+",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F2a3afb7dd7647eb9f1860e7e2111905d48f0093eeb2f11cca2d27478cd1e0d34",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 12+ (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "13",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F883e52817a416cc64d0f01a735631e119fd6aded15b35421b560cf3159a10174",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 13 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "13+",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "Feb10967956ffc1a5c2169a17b09ba870de30cd88ba0c4f8c396db2b44137681d",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 13+ (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "14",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "Fa266a4d4f139a3a02c42f4fd1c1d1be8f2bfb9db98e5aac3b14b71e7058417f8",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 14 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "14+",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F6dde73f8db05437924a9eb79f8fde8d89c37650f6af7b0590e417929830997b2",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 14+ (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "15",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F45bb90e158a0cbc0a3f5bea07751c7b5fb20aec64b338f37653583d9e9bf933c",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 15 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "2",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F9af30d260328061478226ddf10ad43180bc5ffb55702dfed107cd59deaa6fb0f",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 2 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "3",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "Ff6b33cc832a17f7b8e7ef273b611e59280798c941cad7af8d83347cdead9ecf3",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 3 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "4",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F243e4b306bd8bea068d1ff5eeebb9a0e220616e83a5f3ae303f9cb6826e481c0",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 4 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "5",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F9f5017470109cb3915406a9a61584f0356d176f928479054dec79d828300025e",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 5 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "6",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "Fd041168c6965fddfca8dccd7f00d2f3afaa07c1275a1f73d2ad8bb4e636b540b",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 6 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "7",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "Fd49059e2a6cbc98387396f25de5c338af91dea470a60d1fe00ebf9f0e4d9fb05",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 7 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "7+",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F98d1103245906fa743cc0823938681806c1d9779d2c30bf15e3e6b7813baa302",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 7+ (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "8",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F402f329188a03ec04ecf4494d11b88c4d2865b3f2ff169f7c1221759ba9ca051",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 8 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "8+",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "Fa34a7464ac08a40b3d31f4cf7d30f89768e3cad6a4a0907e2cc3a5ddcca4fa76",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 8+ (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "9",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "F48dbb374e10aa45cab57c9e45c7199b86b808d6ae0802515171d7df2a8b71c9e",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 9 (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "9+",
|
||||
"versions": "universeplus"
|
||||
},
|
||||
"folderID": "Fbfd07d6eeaf655262a15efbbef3a7d014b69ae6d19ed555c2c62f603fed43e4c",
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"searchTerms": [],
|
||||
"title": "Level 9+ (UNiVERSE PLUS)",
|
||||
"type": "charts"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"level": "1",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2752,6 +2752,40 @@
|
||||
"tableID": "jubeat-Single-lv-saucer",
|
||||
"title": "Level Folders (saucer)"
|
||||
},
|
||||
{
|
||||
"default": false,
|
||||
"description": "Levels for maimai DX in UNiVERSE PLUS.",
|
||||
"folders": [
|
||||
"F0fbdcae40c32aa7cd9a3cbb94ca1682e9e64f2c92c637be1c650e2572492f675",
|
||||
"F9af30d260328061478226ddf10ad43180bc5ffb55702dfed107cd59deaa6fb0f",
|
||||
"Ff6b33cc832a17f7b8e7ef273b611e59280798c941cad7af8d83347cdead9ecf3",
|
||||
"F243e4b306bd8bea068d1ff5eeebb9a0e220616e83a5f3ae303f9cb6826e481c0",
|
||||
"F9f5017470109cb3915406a9a61584f0356d176f928479054dec79d828300025e",
|
||||
"Fd041168c6965fddfca8dccd7f00d2f3afaa07c1275a1f73d2ad8bb4e636b540b",
|
||||
"Fd49059e2a6cbc98387396f25de5c338af91dea470a60d1fe00ebf9f0e4d9fb05",
|
||||
"F98d1103245906fa743cc0823938681806c1d9779d2c30bf15e3e6b7813baa302",
|
||||
"F402f329188a03ec04ecf4494d11b88c4d2865b3f2ff169f7c1221759ba9ca051",
|
||||
"Fa34a7464ac08a40b3d31f4cf7d30f89768e3cad6a4a0907e2cc3a5ddcca4fa76",
|
||||
"F48dbb374e10aa45cab57c9e45c7199b86b808d6ae0802515171d7df2a8b71c9e",
|
||||
"Fbfd07d6eeaf655262a15efbbef3a7d014b69ae6d19ed555c2c62f603fed43e4c",
|
||||
"F7a4d2b540e5d572644a558738ac11f8520d3b70fee2479443b7c92b72c61cc46",
|
||||
"F25f7c9177235d7b06c8f250900b21119091163ae5babeef6162a87cc8bc417fe",
|
||||
"F6219546c53513f346a871326397951b48fd9153fed40d64d9c02cdc1dc437357",
|
||||
"F27e9c507738e00794a33f624159b83594022ab7cb1bfb8054a3eb6a85b4f6139",
|
||||
"F85014701324320462539482506091a04b72652869bc1b2d92c451c109813d9c8",
|
||||
"F2a3afb7dd7647eb9f1860e7e2111905d48f0093eeb2f11cca2d27478cd1e0d34",
|
||||
"F883e52817a416cc64d0f01a735631e119fd6aded15b35421b560cf3159a10174",
|
||||
"Feb10967956ffc1a5c2169a17b09ba870de30cd88ba0c4f8c396db2b44137681d",
|
||||
"Fa266a4d4f139a3a02c42f4fd1c1d1be8f2bfb9db98e5aac3b14b71e7058417f8",
|
||||
"F6dde73f8db05437924a9eb79f8fde8d89c37650f6af7b0590e417929830997b2",
|
||||
"F45bb90e158a0cbc0a3f5bea07751c7b5fb20aec64b338f37653583d9e9bf933c"
|
||||
],
|
||||
"game": "maimaidx",
|
||||
"inactive": false,
|
||||
"playtype": "Single",
|
||||
"tableID": "maimaidx-Single-universeplus-levels",
|
||||
"title": "maimai DX (UNiVERSE PLUS)"
|
||||
},
|
||||
{
|
||||
"default": true,
|
||||
"description": "Levels for MÚSECA in 1 + 1/2 Rev. B.",
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
const { parse } = require("csv-parse/sync");
|
||||
const fs = require("fs");
|
||||
const fetch = require("node-fetch");
|
||||
const { Command } = require("commander");
|
||||
const { CreateChartID, ReadCollection, WriteCollection } = require("../../util");
|
||||
const { decode } = require("html-entities");
|
||||
const logger = require("../../logger");
|
||||
|
||||
const program = new Command();
|
||||
|
||||
const DATA_URL = "https://maimai.sega.jp/data/maimai_songs.json";
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { GetTableFromParam } from "./middleware";
|
||||
import { Router } from "express";
|
||||
import db from "external/mongo/db";
|
||||
import CreateLogCtx from "lib/logger/logger";
|
||||
import { FormatGame } from "tachi-common";
|
||||
import { GetFoldersFromTable } from "utils/folder";
|
||||
import { GetGPT, GetTachiData } from "utils/req-tachi-data";
|
||||
import type { FilterQuery } from "mongodb";
|
||||
@@ -8,6 +10,8 @@ import type { TableDocument } from "tachi-common";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
|
||||
/**
|
||||
* Return all the tables for this game.
|
||||
*
|
||||
@@ -26,6 +30,19 @@ router.get("/", async (req, res) => {
|
||||
|
||||
const tables = await db.tables.find(query);
|
||||
|
||||
if (tables.length === 0) {
|
||||
logger.error(
|
||||
`The game ${FormatGame(
|
||||
game,
|
||||
playtype
|
||||
)} has no tables. This renders table support for the game broken!`
|
||||
);
|
||||
return res.status(500).json({
|
||||
success: false,
|
||||
description: "This game has no tables.",
|
||||
});
|
||||
}
|
||||
|
||||
return res.status(200).json({
|
||||
success: true,
|
||||
description: `Returned ${tables.length} tables.`,
|
||||
|
||||
Reference in New Issue
Block a user