diff --git a/client/src/components/tables/cells/MusecaJudgementCell.tsx b/client/src/components/tables/cells/MusecaJudgementCell.tsx index c1f9537b5..f56bd3b03 100644 --- a/client/src/components/tables/cells/MusecaJudgementCell.tsx +++ b/client/src/components/tables/cells/MusecaJudgementCell.tsx @@ -2,7 +2,7 @@ import React from "react"; import { COLOUR_SET, PBScoreDocument, ScoreDocument } from "tachi-common"; import { IsNullish } from "util/misc"; -export default function SDVXJudgementCell({ +export default function MusecaJudgementCell({ score, }: { score: ScoreDocument<"museca:Single"> | PBScoreDocument<"museca:Single">; diff --git a/client/src/components/tables/cells/PopnJudgementCell.tsx b/client/src/components/tables/cells/PopnJudgementCell.tsx new file mode 100644 index 000000000..89755b4ed --- /dev/null +++ b/client/src/components/tables/cells/PopnJudgementCell.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import { COLOUR_SET, PBScoreDocument, ScoreDocument } from "tachi-common"; +import { IsNullish } from "util/misc"; + +export default function PopnJudgementCell({ + score, +}: { + score: ScoreDocument<"popn:9B"> | PBScoreDocument<"popn:9B">; +}) { + const judgements = score.scoreData.judgements; + + if (IsNullish(judgements.bad) || IsNullish(judgements.great) || IsNullish(judgements.good)) { + return No Data.; + } + + return ( + + + {judgements.great}- + {judgements.good} + {judgements.bad} + + + ); +} diff --git a/client/src/components/tables/cells/TitleCell.tsx b/client/src/components/tables/cells/TitleCell.tsx index d78e3f0b0..250b9485b 100644 --- a/client/src/components/tables/cells/TitleCell.tsx +++ b/client/src/components/tables/cells/TitleCell.tsx @@ -1,4 +1,5 @@ import GentleLink from "components/util/GentleLink"; +import Muted from "components/util/Muted"; import React from "react"; import { ChartDocument, Game, SongDocument } from "tachi-common"; import { CreateChartLink } from "util/data"; @@ -18,6 +19,16 @@ export default function TitleCell({ }) { return ( + {game === "popn" && ( + <> + {(song as SongDocument<"popn">).data.genre === song.title ? ( + Unknown Genre + ) : ( + (song as SongDocument<"popn">).data.genre + )} +
+ + )} {song.title} {!noArtist && ( diff --git a/client/src/components/tables/cells/WACCAJudgementCell.tsx b/client/src/components/tables/cells/WACCAJudgementCell.tsx new file mode 100644 index 000000000..dd2366133 --- /dev/null +++ b/client/src/components/tables/cells/WACCAJudgementCell.tsx @@ -0,0 +1,43 @@ +import React from "react"; +import { COLOUR_SET, PBScoreDocument, ScoreDocument } from "tachi-common"; +import { IsNullish } from "util/misc"; + +export default function WaccaJudgementCell({ + score, +}: { + score: ScoreDocument<"wacca:Single"> | PBScoreDocument<"wacca:Single">; +}) { + // even if we dont have judgement data, we know what they got. + if (score.scoreData.lamp === "ALL MARVELOUS") { + return ( + + + 0- + 0- + 0 + + + ); + } + + // safety + if (score.scoreData.lamp === "FULL COMBO") { + score.scoreData.judgements.miss = 0; + } + + const judgements = score.scoreData.judgements; + + if (IsNullish(judgements.miss) || IsNullish(judgements.great) || IsNullish(judgements.good)) { + return No Data.; + } + + return ( + + + {judgements.great}- + {judgements.good} + {judgements.miss} + + + ); +} diff --git a/client/src/components/tables/game-core-cells/PopnCoreCells.tsx b/client/src/components/tables/game-core-cells/PopnCoreCells.tsx new file mode 100644 index 000000000..649e4b1bd --- /dev/null +++ b/client/src/components/tables/game-core-cells/PopnCoreCells.tsx @@ -0,0 +1,26 @@ +import React from "react"; +import { PBScoreDocument, ScoreDocument } from "tachi-common"; +import { IsNullish } from "util/misc"; +import LampCell from "../cells/LampCell"; +import MillionsScoreCell from "../cells/MillionsScoreCell"; +import PopnJudgementCell from "../cells/PopnJudgementCell"; +import WaccaJudgementCell from "../cells/WACCAJudgementCell"; + +export default function PopnCoreCells({ + sc, +}: { + sc: ScoreDocument<"popn:9B"> | PBScoreDocument<"popn:9B">; +}) { + return ( +
+ + + + + {!IsNullish(sc.calculatedData.classPoints) + ? sc.calculatedData.classPoints!.toFixed(3) + : "N/A"} + +
+ ); +} diff --git a/client/src/components/tables/game-core-cells/ScoreCoreCells.tsx b/client/src/components/tables/game-core-cells/ScoreCoreCells.tsx index fa5d83fdc..1207e808c 100644 --- a/client/src/components/tables/game-core-cells/ScoreCoreCells.tsx +++ b/client/src/components/tables/game-core-cells/ScoreCoreCells.tsx @@ -10,7 +10,9 @@ import BMSScoreCoreCells from "./BMSScoreCoreCells"; import GenericScoreCoreCells from "./GenericScoreCoreCells"; import IIDXScoreCoreCells from "./IIDXScoreCoreCells"; import MusecaScoreCoreCells from "./MusecaScoreCoreCells"; +import PopnCoreCells from "./PopnCoreCells"; import SDVXScoreCoreCells from "./SDVXCoreCells"; +import WACCACoreCells from "./WACCACoreCells"; export default function ScoreCoreCells({ game, @@ -38,6 +40,10 @@ export default function ScoreCoreCells({ return ; } else if (game === "museca") { return ; + } else if (game === "wacca") { + return ; + } else if (game === "popn") { + return ; } return ; diff --git a/client/src/components/tables/game-core-cells/WACCACoreCells.tsx b/client/src/components/tables/game-core-cells/WACCACoreCells.tsx new file mode 100644 index 000000000..f664271c1 --- /dev/null +++ b/client/src/components/tables/game-core-cells/WACCACoreCells.tsx @@ -0,0 +1,23 @@ +import React from "react"; +import { PBScoreDocument, ScoreDocument } from "tachi-common"; +import { IsNullish } from "util/misc"; +import LampCell from "../cells/LampCell"; +import MillionsScoreCell from "../cells/MillionsScoreCell"; +import WaccaJudgementCell from "../cells/WACCAJudgementCell"; + +export default function WACCACoreCells({ + sc, +}: { + sc: ScoreDocument<"wacca:Single"> | PBScoreDocument<"wacca:Single">; +}) { + return ( +
+ + + + + {!IsNullish(sc.calculatedData.rate) ? sc.calculatedData.rate!.toFixed(3) : "N/A"} + +
+ ); +}