Skip to content

Commit

Permalink
chore,fix: upgrade ongeki seeds (#1070)
Browse files Browse the repository at this point in the history
* chore,fix: upgrade ongeki seeds

The dataset is up to date up until March 27th, 2024.
A single chart is missing:
https://wikiwiki.jp/gameongeki/怒槌~光吉猛修一部謎~

Added maxPlatScore and inGameID.
Added alt (romaji) song titles.
Removed the wikiwiki scraper because it's no longer relevant.
Restored the score column that relied on maxPlatScore.
Fixed the client crashing when you click Lamps Only in a geki session.
Removed Act 2.

* fix: missing fields in the test chart

* chore: get rid of isUnranked

* fix: clarify the track ID range
  • Loading branch information
nyairobi authored May 13, 2024
1 parent 72e40a6 commit 1884572
Show file tree
Hide file tree
Showing 13 changed files with 15,709 additions and 14,794 deletions.
5 changes: 2 additions & 3 deletions client/src/components/sessions/SessionRaiseBreakdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default function SessionRaiseBreakdown({
}) {
const game = sessionData.session.game;
const playtype = sessionData.session.playtype;
const lampName = game === "ongeki" ? "noteLamp" : "lamp";

const { user } = useContext(UserContext);

Expand Down Expand Up @@ -82,14 +83,12 @@ export default function SessionRaiseBreakdown({
<div className="col-12 col-lg-6 offset-lg-3">
<div className="d-none d-lg-flex justify-content-center">
<div className="btn-group">
<SelectButton value={view} setValue={setView} id="lamp">
<SelectButton value={view} setValue={setView} id={lampName}>
<Icon type="lightbulb" /> Lamps Only
</SelectButton>

<SelectButton value={view} setValue={setView} id={null}>
<Icon type="bolt" /> All
</SelectButton>

<SelectButton value={view} setValue={setView} id="grade">
<Icon type="sort-alpha-up" /> Grades Only
</SelectButton>
Expand Down
34 changes: 34 additions & 0 deletions client/src/components/tables/cells/OngekiPlatinumCell.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from "react";
import { Difficulties, integer } from "tachi-common";

export default function OngekiPlatinumCell({
platScore: platScore,
maxPlatScore: maxPlatScore,
difficulty,
}: {
platScore: integer | null | undefined;
maxPlatScore: integer;
difficulty: Difficulties["ongeki:Single"];
}) {
if (difficulty !== "MASTER" && difficulty !== "LUNATIC") {
return <td>N/A</td>;
}

if (platScore === null || platScore === undefined) {
return <td>Unknown</td>;
}

return (
<td>
<strong>MAX-{maxPlatScore - platScore}</strong>
{platScore !== undefined && (
<>
<br />
<small className="text-body-secondary">
[{platScore}/{maxPlatScore}]
</small>
</>
)}
</td>
);
}
29 changes: 13 additions & 16 deletions client/src/lib/game-implementations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import WaccaJudgementCell from "components/tables/cells/WACCAJudgementCell";
import OngekiJudgementCell from "components/tables/cells/OngekiJudgementCell";
import React from "react";
import OngekiLampCell from "components/tables/cells/OngekiLampCell";
import OngekiPlatinumCell from "components/tables/cells/OngekiPlatinumCell";
import { CreateRatingSys, bgc } from "./games/_util";
import { BMS_14K_IMPL, BMS_7K_IMPL, PMS_IMPL } from "./games/bms-pms";
import { IIDX_DP_IMPL, IIDX_SP_IMPL } from "./games/iidx";
Expand Down Expand Up @@ -786,6 +787,8 @@ export const GPT_CLIENT_IMPLEMENTATIONS: GPTClientImplementations = {
(x) => x.scoreData.score * 10000 + (x.scoreData.optional.platScore ?? 0)
),
],
// TODO: this should be sorted by %
["Platinum Score", "Score", NumericSOV((x) => x.scoreData.optional.platScore ?? 0)],
["Judgements", "Hits", NumericSOV((x) => x.scoreData.score)],
[
"Lamp",
Expand All @@ -798,22 +801,16 @@ export const GPT_CLIENT_IMPLEMENTATIONS: GPTClientImplementations = {
],
scoreCoreCells: ({ sc, chart }) => (
<>
<td
style={{
backgroundColor: ChangeOpacity(GetEnumColour(sc, "grade"), 0.2),
}}
>
<strong>{sc.scoreData.grade}</strong>
<br />
{FormatMillions(sc.scoreData.score)}
{typeof sc.scoreData.optional.platScore === "number" &&
(chart.difficulty === "MASTER" || chart.difficulty === "LUNATIC") && (
<>
<br />
[Plat: {sc.scoreData.optional.platScore}]
</>
)}
</td>
<MillionsScoreCell
score={sc.scoreData.score}
grade={sc.scoreData.grade}
colour={GetEnumColour(sc, "grade")}
/>
<OngekiPlatinumCell
platScore={sc.scoreData.optional.platScore}
maxPlatScore={chart.data.maxPlatScore}
difficulty={chart.difficulty}
/>
<OngekiJudgementCell score={sc} />
<OngekiLampCell
lamp1={sc.scoreData.noteLamp}
Expand Down
11 changes: 5 additions & 6 deletions common/src/config/game-support/ongeki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ export const ONGEKI_SINGLE_CONF = {
type: "ENUM",
values: ["LOSS", "CLEAR", "FULL COMBO", "ALL BREAK"],
minimumRelevantValue: "CLEAR",
description: "The first lamp. A clear is either a draw or a win.",
description: "The primary lamp. A clear is either a draw or a win.",
},
bellLamp: {
type: "ENUM",
values: ["NONE", "FULL BELL"],
minimumRelevantValue: "NONE",
description:
"The second lamp that tracks whether all bells in the chart have been collected.",
"Tracks whether all bells in the chart have been collected.",
},
},

Expand Down Expand Up @@ -135,21 +135,20 @@ export const ONGEKI_SINGLE_CONF = {
orderedJudgements: ["cbreak", "break", "hit", "miss"],

versions: {
brightMemory2: "bright MEMORY Act.II",
brightMemory2Omni: "bright MEMORY Act.II Omnimix",
brightMemory3: "bright MEMORY Act.III",
brightMemory3Omni: "bright MEMORY Act.III Omnimix",
},

chartData: z.strictObject({
displayVersion: z.string(),
isUnranked: z.boolean().optional(),
isReMaster: z.boolean().optional(),
maxPlatScore: z.number().int(),
inGameID: z.number().int(),
}),

preferences: z.strictObject({}),

scoreMeta: z.strictObject({}),

supportedMatchTypes: ["songTitle", "tachiSongID"],
supportedMatchTypes: ["songTitle", "tachiSongID", "inGameID"],
} as const satisfies INTERNAL_GAME_PT_CONFIG;
Loading

0 comments on commit 1884572

Please sign in to comment.