From 5cbb2d5f8ab2c90e744f5e8a653eba4e2beeb70f Mon Sep 17 00:00:00 2001
From: zkldi <20380519+zkldi@users.noreply.github.com>
Date: Sun, 15 Jan 2023 00:57:06 +0000
Subject: [PATCH] checkpoint: insanity ascends (35)
127 errors to go
---
client/package.json | 3 +-
.../src/app/pages/dashboard/DashboardPage.tsx | 4 +-
.../games/_game/_playtype/GPTChartPage.tsx | 50 +-
.../games/_game/_playtype/GPTDevInfo.tsx | 11 +-
.../_game/_playtype/GPTLeaderboardsPage.tsx | 37 +-
.../games/_game/_playtype/GPTSongsPage.tsx | 15 +-
.../_game/_playtype/LeaderboardsPage.tsx | 10 +-
.../games/_game/_playtype/OverviewPage.tsx | 4 +-
.../games/_game/_playtype/ScoresPage.tsx | 20 +-
.../games/_game/_playtype/SessionsPage.tsx | 2 +-
.../_game/_playtype/UGPTSettingsPage.tsx | 25 +-
.../_playtype/folders/FolderComparePage.tsx | 15 -
.../_playtype/folders/FolderSelectPage.tsx | 4 +-
.../_playtype/folders/SpecificFolderPage.tsx | 523 ++----------------
client/src/components/activity/Activity.tsx | 32 +-
client/src/components/game/ClassBadge.tsx | 48 +-
.../src/components/game/ScoreLeaderboard.tsx | 4 +-
.../game/charts/ChartInfoFormat.tsx | 69 ++-
.../game/folder/FolderInfoHeader.tsx | 6 +-
.../components/game/folder/FolderMinimap.tsx | 120 ++--
.../components/game/songs/SongInfoFormat.tsx | 2 +-
client/src/components/gpt-utils/GPTUtils.tsx | 6 +-
.../gpt-utils/tools/BMSSieglindeInfoTool.tsx | 10 +-
.../sessions/SessionFolderRaiseBreakdown.tsx | 3 +-
.../components/sessions/SessionOverview.tsx | 8 +-
.../sessions/SessionRaiseBreakdown.tsx | 248 ++++-----
.../tables/cells/BMSOrPMSDifficultyCell.tsx | 14 +-
.../tables/cells/BMSOrPMSLampCell.tsx | 11 +-
.../src/components/tables/cells/BPICell.tsx | 29 +-
.../src/components/tables/cells/DeltaCell.tsx | 4 +-
.../tables/cells/DifficultyCell.tsx | 4 +-
.../components/tables/cells/IIDXLampCell.tsx | 30 +-
.../tables/cells/ITGDifficultyCell.tsx | 4 +-
.../tables/cells/JubeatScoreCell.tsx | 20 +-
.../src/components/tables/cells/LampCell.tsx | 9 +-
.../tables/cells/MillionsScoreCell.tsx | 20 +-
.../components/tables/cells/PBCompareCell.tsx | 47 +-
.../components/tables/cells/PopnLampCell.tsx | 24 +-
.../tables/cells/RatingSystemPart.tsx | 81 +++
.../components/tables/cells/SDVXLampCell.tsx | 7 +-
.../src/components/tables/cells/ScoreCell.tsx | 34 +-
.../tables/cells/ScoreCellLarge.tsx | 12 -
.../tables/cells/TierlistInfoPart.tsx | 65 ---
.../tables/cells/USCDifficultyCell.tsx | 4 +-
.../src/components/tables/cells/VF6Cell.tsx | 25 +-
.../components/SelectableCompareType.tsx | 12 +-
.../tables/components/SelectableRating.tsx | 23 +-
.../tables/dropdowns/PBDropdown.tsx | 61 +-
.../tables/dropdowns/ScoreDropdown.tsx | 12 +-
.../components/BMSScoreDropdownParts.tsx | 4 +-
.../components/IIDXScoreDropdownParts.tsx | 10 +-
.../dropdowns/components/JudgementTable.tsx | 9 +-
.../tables/dropdowns/components/PBCompare.tsx | 10 +-
.../components/tables/folders/FolderTable.tsx | 12 +-
.../tables/game-core-cells/BMSCoreCells.tsx | 4 +-
.../game-core-cells/CHUNITHMCoreCells.tsx | 9 +-
.../game-core-cells/GitadoraCoreCells.tsx | 3 +-
.../tables/game-core-cells/IIDXCoreCells.tsx | 9 +-
.../tables/game-core-cells/ITGCoreCells.tsx | 3 +-
.../game-core-cells/JubeatCoreCells.tsx | 4 +-
.../game-core-cells/MaimaiDXCoreCells.tsx | 3 +-
.../game-core-cells/MusecaCoreCells.tsx | 13 +-
.../tables/game-core-cells/PMSCoreCells.tsx | 4 +-
.../tables/game-core-cells/PopnCoreCells.tsx | 7 +-
.../tables/game-core-cells/SDVXCoreCells.tsx | 7 +-
.../tables/game-core-cells/ScoreCoreCells.tsx | 38 +-
.../tables/game-core-cells/WACCACoreCells.tsx | 9 +-
.../components/tables/headers/ChartHeader.tsx | 60 +-
.../components/tables/headers/GameHeaders.tsx | 160 ++----
.../history-scores/HistoryScoreTable.tsx | 6 +-
client/src/components/tables/pbs/PBTable.tsx | 16 +-
.../tables/rivals/ComparePBsTable.tsx | 78 ++-
.../tables/rivals/RivalChartTable.tsx | 18 +-
.../components/tables/scores/ScoreTable.tsx | 18 +-
.../seeds/SeedsBMSCourseLookupTable.tsx | 4 +-
.../tables/sessions/GenericSessionTable.tsx | 10 +-
.../targets/AddNewGoalForQuestModal.tsx | 21 +-
.../components/targets/AddNewQuestModal.tsx | 4 +-
.../components/targets/SetNewGoalModal.tsx | 4 +-
.../src/components/user/UGPTRankingData.tsx | 6 +-
.../src/components/user/UGPTStatShowcase.tsx | 59 +-
.../src/components/user/UGPTStatsOverview.tsx | 29 +-
client/src/components/util/useBucket.tsx | 6 +-
.../src/components/util/useLUGPTSettings.tsx | 8 +-
.../components/util/usePreferredRanking.tsx | 4 +-
.../src/components/util/useScoreRatingAlg.tsx | 32 +-
client/src/context/UserSettingsContext.tsx | 10 +-
client/src/lib/game-implementations.ts | 414 ++++++++++++++
client/src/lib/games/_util.ts | 27 +
client/src/lib/games/bms-pms.ts | 58 ++
client/src/lib/games/gitadora.ts | 86 +++
client/src/lib/games/iidx.ts | 123 ++++
client/src/lib/games/sdvx-usc.ts | 71 +++
client/src/lib/types.ts | 79 +++
client/src/types/api-returns.ts | 32 +-
client/src/types/seeds.ts | 4 +-
client/src/types/tables.ts | 2 +-
client/src/util/data.ts | 14 +-
client/src/util/misc.ts | 97 +---
client/src/util/str-to-num.ts | 48 +-
client/src/util/tables/create-search.ts | 76 ++-
client/src/util/tierlist.ts | 73 ---
client/tsconfig.json | 2 +-
common/src/config/game-support/_common.ts | 7 +-
common/src/config/game-support/bms.ts | 31 +-
common/src/config/game-support/chunithm.ts | 3 +-
common/src/config/game-support/gitadora.ts | 3 +-
common/src/config/game-support/iidx.ts | 10 +-
common/src/config/game-support/itg.ts | 17 +-
common/src/config/game-support/jubeat.ts | 5 +-
common/src/config/game-support/maimai-dx.ts | 3 +-
common/src/config/game-support/museca.ts | 3 +-
common/src/config/game-support/pms.ts | 29 +-
common/src/config/game-support/popn.ts | 5 +-
common/src/config/game-support/sdvx.ts | 7 +-
common/src/config/game-support/usc.ts | 5 +-
common/src/config/game-support/wacca.ts | 3 +-
common/src/lib/schemas.ts | 2 +-
common/src/types/documents.ts | 2 +-
common/src/types/game-config.ts | 2 +-
common/src/types/metrics.ts | 6 +-
common/src/utils/util.ts | 54 +-
.../scripts/test/match-type.test.ts | 2 +-
.../src/game-implementations/games/_common.ts | 18 +-
.../lib/game-settings/create-game-settings.ts | 2 +-
server/src/lib/showcase/get-stats.test.ts | 2 +-
.../_game/_playtype/settings/router.test.ts | 10 +-
.../games/_game/_playtype/settings/router.ts | 6 +-
.../_game/_playtype/showcase/router.test.ts | 4 +-
server/src/test-utils/test-data.ts | 2 +-
staging | 1 +
131 files changed, 2106 insertions(+), 1886 deletions(-)
create mode 100644 client/src/components/tables/cells/RatingSystemPart.tsx
delete mode 100644 client/src/components/tables/cells/ScoreCellLarge.tsx
delete mode 100644 client/src/components/tables/cells/TierlistInfoPart.tsx
create mode 100644 client/src/lib/game-implementations.ts
create mode 100644 client/src/lib/games/_util.ts
create mode 100644 client/src/lib/games/bms-pms.ts
create mode 100644 client/src/lib/games/gitadora.ts
create mode 100644 client/src/lib/games/iidx.ts
create mode 100644 client/src/lib/games/sdvx-usc.ts
create mode 100644 client/src/lib/types.ts
delete mode 100644 client/src/util/tierlist.ts
create mode 160000 staging
diff --git a/client/package.json b/client/package.json
index 4caebd8f6..bb6d8080e 100644
--- a/client/package.json
+++ b/client/package.json
@@ -7,7 +7,8 @@
"start": "vite",
"build": "vite build",
"lint": "eslint src --fix",
- "preview": "vite build && vite preview"
+ "preview": "vite build && vite preview",
+ "typecheck": "tsc -b"
},
"browserslist": {
"production": [
diff --git a/client/src/app/pages/dashboard/DashboardPage.tsx b/client/src/app/pages/dashboard/DashboardPage.tsx
index 4ccb3b85f..2144519fa 100644
--- a/client/src/app/pages/dashboard/DashboardPage.tsx
+++ b/client/src/app/pages/dashboard/DashboardPage.tsx
@@ -199,8 +199,8 @@ function UserGameStatsInfo({ user }: { user: UserDocument }) {
const gameConfig = GetGameConfig(a.game);
return (
- gameConfig.validPlaytypes.indexOf(a.playtype) -
- gameConfig.validPlaytypes.indexOf(b.playtype)
+ gameConfig.playtypes.indexOf(a.playtype) -
+ gameConfig.playtypes.indexOf(b.playtype)
);
}
diff --git a/client/src/app/pages/dashboard/games/_game/_playtype/GPTChartPage.tsx b/client/src/app/pages/dashboard/games/_game/_playtype/GPTChartPage.tsx
index cc062327f..6805b69d5 100644
--- a/client/src/app/pages/dashboard/games/_game/_playtype/GPTChartPage.tsx
+++ b/client/src/app/pages/dashboard/games/_game/_playtype/GPTChartPage.tsx
@@ -4,15 +4,20 @@ import { SelectRightChart } from "util/misc";
import { MillisToSince } from "util/time";
import useSetSubheader from "components/layout/header/useSetSubheader";
import Card from "components/layout/page/Card";
-import LampCell from "components/tables/cells/LampCell";
-import ScoreCell from "components/tables/cells/ScoreCell";
import MiniTable from "components/tables/components/MiniTable";
+import TargetInfo from "components/tables/dropdowns/components/TargetInfo";
+import ScoreCoreCells from "components/tables/game-core-cells/ScoreCoreCells";
import PBTable from "components/tables/pbs/PBTable";
import ProfilePicture from "components/user/ProfilePicture";
import ApiError from "components/util/ApiError";
+import Divider from "components/util/Divider";
import Icon from "components/util/Icon";
import Loading from "components/util/Loading";
import Muted from "components/util/Muted";
+import SelectLinkButton from "components/util/SelectLinkButton";
+import useApiQuery from "components/util/query/useApiQuery";
+import useLUGPTSettings from "components/util/useLUGPTSettings";
+import { TargetsContext } from "context/TargetsContext";
import { UserContext } from "context/UserContext";
import React, { useContext, useMemo, useState } from "react";
import { Col, Row } from "react-bootstrap";
@@ -23,10 +28,10 @@ import {
FormatDifficulty,
GetGameConfig,
GetGamePTConfig,
- integer,
PBScoreDocument,
- UserDocument,
SongDocument,
+ UserDocument,
+ integer,
} from "tachi-common";
import {
ChartPBLeaderboardReturn,
@@ -36,12 +41,6 @@ import {
} from "types/api-returns";
import { GamePT, SetState } from "types/react";
import { PBDataset } from "types/tables";
-import useLUGPTSettings from "components/util/useLUGPTSettings";
-import TargetInfo from "components/tables/dropdowns/components/TargetInfo";
-import useApiQuery from "components/util/query/useApiQuery";
-import Divider from "components/util/Divider";
-import { TargetsContext } from "context/TargetsContext";
-import SelectLinkButton from "components/util/SelectLinkButton";
// This component forms a wrapper around the Real GPT Chart Page
// which handles the case where activeChart == null.
@@ -206,7 +205,7 @@ function InternalGPTChartPage({
)}
-
- )}
+