diff --git a/common/src/constants/bms-tables.test.ts b/common/src/constants/bms-tables.test.ts new file mode 100644 index 000000000..7031f313d --- /dev/null +++ b/common/src/constants/bms-tables.test.ts @@ -0,0 +1,10 @@ +import { BMS_TABLES } from "./bms-tables"; +import t from "tap"; + +t.test("BMS Tables should be unique.", (t) => { + const allKeys = BMS_TABLES.map((e) => `${e.playtype}-${e.prefix}`); + + t.strictSame(allKeys, [...new Set(allKeys)], "There should be no duplicate tables prefixes."); + + t.end(); +}); diff --git a/common/src/constants/bms-tables.ts b/common/src/constants/bms-tables.ts index 3aef14c08..96fd5fd91 100644 --- a/common/src/constants/bms-tables.ts +++ b/common/src/constants/bms-tables.ts @@ -1,3 +1,4 @@ +import { COLOUR_SET } from "../config/config"; import type { Playtypes } from "../types"; export interface BMSTableInfo { @@ -12,6 +13,13 @@ export interface BMSTableInfo { description: string; playtype: Playtypes["bms"]; url: string; + + // Should this table be hidden in the UI by default? + notDefault?: boolean; + + // What colour should this table be in the UI? + // If no colour is provided, it defaults to gray. + colour?: string; } // I have no confidence in half of these links surviving. @@ -22,57 +30,64 @@ export const BMS_TABLES: Array = [ name: "Insane", playtype: "7K", description: "The 7K GENOSIDE insane table.", - url: "http://www.ribbit.xyz/bms/tables/insane_body.json", + url: "http://www.ribbit.xyz/bms/tables/insane.html", prefix: "★", asciiPrefix: "insane", + colour: COLOUR_SET.red, }, { name: "Normal", playtype: "7K", description: "The 7K GENOSIDE normal table.", - url: "http://www.ribbit.xyz/bms/tables/normal_body.json", + url: "http://www.ribbit.xyz/bms/tables/normal.html", prefix: "☆", asciiPrefix: "normal", + colour: COLOUR_SET.paleGreen, }, { name: "Stella", playtype: "7K", description: "The stella table, from Stellaverse.", - url: "https://stellabms.xyz/st/score.json", + url: "https://stellabms.xyz/st/table.html", prefix: "st", asciiPrefix: "stella", + colour: COLOUR_SET.teal, }, { name: "Satellite", playtype: "7K", description: "The satellite table, from Stellaverse.", - url: "https://stellabms.xyz/sl/score.json", + url: "https://stellabms.xyz/sl/table.html", prefix: "sl", asciiPrefix: "satellite", + colour: COLOUR_SET.vibrantBlue, }, { name: "Insane2", playtype: "7K", description: "A successor to the original insane table, but is generally less consistent.", - url: "https://rattoto10.github.io/second_table/insane_data.json", + url: "https://rattoto10.github.io/second_table/insane_header.json", prefix: "▼", asciiPrefix: "insane2", + colour: COLOUR_SET.maroon, }, { name: "Normal2", playtype: "7K", description: "A successor to the original normal table.", - url: "https://rattoto10.github.io/second_table/score.json", + url: "https://rattoto10.github.io/second_table/header.json", prefix: "▽", asciiPrefix: "normal2", + colour: COLOUR_SET.paleGreen, }, { name: "Overjoy", description: "The overjoy table. Level 1 is roughly equivalent to Insane 20.", playtype: "7K", - url: "http://lr2.sakura.ne.jp/data/score.json", + url: "http://lr2.sakura.ne.jp/overjoy.php", prefix: "★★", asciiPrefix: "overjoy", + colour: COLOUR_SET.paleOrange, }, { name: "DP Insane", @@ -80,7 +95,8 @@ export const BMS_TABLES: Array = [ playtype: "14K", prefix: "★", asciiPrefix: "dpInsane", - url: "http://dpbmsdelta.web.fc2.com/table/data/insane_data.json", + url: "http://dpbmsdelta.web.fc2.com/table/insane.html", + colour: COLOUR_SET.red, }, { name: "DP Normal", @@ -88,7 +104,8 @@ export const BMS_TABLES: Array = [ playtype: "14K", prefix: "δ", asciiPrefix: "dpNormal", - url: "http://dpbmsdelta.web.fc2.com/table/data/dpdelta_data.json", + url: "http://dpbmsdelta.web.fc2.com/table/dpdelta.html", + colour: COLOUR_SET.paleGreen, }, { name: "DP Satellite", @@ -96,7 +113,8 @@ export const BMS_TABLES: Array = [ playtype: "14K", prefix: "sl", asciiPrefix: "dpSatellite", - url: "https://stellabms.xyz/dp/score.json", + url: "https://stellabms.xyz/dp/table.html", + colour: COLOUR_SET.vibrantBlue, }, { name: "Scratch 3rd", @@ -104,7 +122,8 @@ export const BMS_TABLES: Array = [ prefix: "h◎", asciiPrefix: "scratch", playtype: "7K", - url: "http://minddnim.web.fc2.com/sara/3rd_hard/json/data.json", + url: "http://minddnim.web.fc2.com/sara/3rd_hard/bms_sara_3rd_hard.html", + colour: COLOUR_SET.vibrantRed, }, { name: "LN", @@ -112,38 +131,87 @@ export const BMS_TABLES: Array = [ prefix: "◆", asciiPrefix: "ln", playtype: "7K", - url: "http://flowermaster.web.fc2.com/lrnanido/gla/score.json", + url: "http://flowermaster.web.fc2.com/lrnanido/gla/LN.html", + colour: COLOUR_SET.pink, }, { name: "Stardust", prefix: "ξ", asciiPrefix: "stardust", playtype: "7K", - url: "https://mqppppp.neocities.org/StardustData.json", + url: "https://mqppppp.neocities.org/StardustTable.html", description: "The 7K Stardust table. This table covers ☆1 to ☆7.", + colour: COLOUR_SET.paleBlue, }, { name: "Starlight", prefix: "sr", asciiPrefix: "starlight", playtype: "7K", - url: "https://djkuroakari.github.io/data.json", + url: "https://djkuroakari.github.io/starlighttable.html", description: "The 7K Starlight table. This table covers ☆7 to ☆12.", + colour: COLOUR_SET.blue, }, { name: "LN Overjoy", prefix: "◆◆", asciiPrefix: "lnOverjoy", playtype: "7K", - url: "https://notepara.com/glassist/lnoj/body.json", + url: "https://notepara.com/glassist/lnoj", description: "The 7K LN Overjoy table.", + notDefault: true, + colour: COLOUR_SET.vibrantPink, }, { name: "Luminous", - prefix: "lm", + prefix: "ln", asciiPrefix: "luminous", playtype: "7K", url: "https://luminous-api.herokuapp.com/api/charts/accept", description: "The 7K Luminous Table. This is an alternative to the mainline LN tables.", + notDefault: true, + colour: COLOUR_SET.purple, + }, + { + name: "Gachimjoy", + prefix: "双", + asciiPrefix: "gachimjoy", + playtype: "7K", + url: "http://su565fx.web.fc2.com/Gachimijoy/gachimijoy.html", + notDefault: true, + description: + "Gachimjoy is a gachi practice table. 双1 is approximately equivalent to an ★★1", + }, + { + name: "delayjoy", + asciiPrefix: "delayjoy", + + // these trailing slashes are important. keep them. + url: "https://lets-go-time-hell.github.io/Delay-joy-table/", + playtype: "7K", + prefix: "dl", + notDefault: true, + description: + "Delayjoy is a delay practice table. dl0 is approximately equivalent to an st0", + }, + { + name: "Arm Shougakkou", + asciiPrefix: "armShougakkou", + url: "https://lets-go-time-hell.github.io/Arm-Shougakkou-table/", + playtype: "7K", + prefix: "Ude", + notDefault: true, + description: + "The Arm-Shougakkou table is A gachi and gachi-ish practice table, Ude0 is approximately equivalent to an sl0", + }, + { + name: "Exoplanet", + asciiPrefix: "exoplanet", + url: "https://stellabms.xyz/fr/table.html", + playtype: "7K", + prefix: "fr", + notDefault: true, + description: + "Exoplanet is a table by the stella/satellite maintainers with less rules on what can be submitted. Includes gimmick charts.", }, ];