songpack=genre

This commit is contained in:
nairobi
2026-05-19 20:48:03 +02:00
parent 296d8336ac
commit c975c7bf38
2 changed files with 11 additions and 7 deletions
@@ -14,12 +14,16 @@ export default function IIDXStyleSongChartInfoFormat({
}: {
chart: ChartDocument | null;
game: V3Game;
song: SongDocument<"bms" | "chunithm" | "iidx" | "maimaidx" | "ongeki" | "pms" | "popn" | "arcaea">;
song: SongDocument<
"arcaea" | "bms" | "chunithm" | "iidx" | "maimaidx" | "ongeki" | "pms" | "popn"
>;
}) {
const genre =
game === "ongeki"
? ((song as SongDocument<"ongeki">).data.flavorGenre ?? song.data.genre)
: song.data.genre;
let genre = song.data.genre;
if (game === "ongeki") {
genre = (song as SongDocument<"ongeki">).data.flavorGenre ?? song.data.genre;
} else if (game === "arcaea") {
genre = (song as SongDocument<"arceaa">).data.songPack;
}
return (
<>
@@ -28,7 +28,7 @@ export default function SongChartInfoFormat({
/>
);
}
if (["ongeki", "chunithm", "maimaidx", "arcaea"].includes(gameGroup)) {
if (["arcaea", "chunithm", "maimaidx", "ongeki"].includes(gameGroup)) {
let displayVersion = chart?.data.displayVersion ?? song.data.displayVersion;
if (gameGroup === "arcaea") {
displayVersion = `version ${displayVersion}`;
@@ -37,7 +37,7 @@ export default function SongChartInfoFormat({
<>
<IIDXStyleSongChartInfoFormat
{...{
song: song as SongDocument<"chunithm" | "maimaidx" | "ongeki" | "arcaea">,
song: song as SongDocument<"arcaea" | "chunithm" | "maimaidx" | "ongeki">,
chart,
game,
}}