From b5085dafe6eebaab068b5d69468c835ff076fdbe Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Fri, 21 Oct 2022 03:51:25 +0100 Subject: [PATCH] fix: use correct formatting in popn tables --- .../scripts/rerunners/popn/make-popn-folders.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/database-seeds/scripts/rerunners/popn/make-popn-folders.js b/database-seeds/scripts/rerunners/popn/make-popn-folders.js index 6bc0ceaec..076e5cce6 100644 --- a/database-seeds/scripts/rerunners/popn/make-popn-folders.js +++ b/database-seeds/scripts/rerunners/popn/make-popn-folders.js @@ -4,6 +4,8 @@ const tableMainFolders = []; const tableAllFolders = []; const { Command } = require("commander"); +const { GetGamePTConfig } = require("tachi-common"); +const { PrettyVersions } = require("tachi-common/config/static-config"); const program = new Command(); program.requiredOption("-v, --version "); @@ -11,6 +13,8 @@ program.requiredOption("-v, --version "); program.parse(process.argv); const options = program.opts(); +const fmtVersion = PrettyVersions["popn:9B"][options.version]; + MutateCollection("folders.json", (folders) => { for (let i = 0; i < 3; i++) { const lb = 10 * i === 0 ? 1 : 10 * i; @@ -28,7 +32,7 @@ MutateCollection("folders.json", (folders) => { inactive: false, playtype: "9B", searchTerms: [], - title: `Level ${lb}-${ub} (${options.version})`, + title: `Level ${lb}-${ub} (${fmtVersion})`, type: "charts", }; @@ -50,7 +54,7 @@ MutateCollection("folders.json", (folders) => { inactive: false, playtype: "9B", searchTerms: [], - title: `Level ${i} (${options.version})`, + title: `Level ${i} (${fmtVersion})`, type: "charts", }; @@ -73,8 +77,8 @@ MutateCollection("folders.json", (folders) => { MutateCollection("tables.json", (tables) => { tables.push({ default: false, - title: `Pop'n Music ${options.version} All Levels`, - description: `All pop'n ${options.version} levels individually.`, + title: `Pop'n Music ${fmtVersion} All Levels`, + description: `All pop'n ${fmtVersion} levels individually.`, tableID: `popn-9B-${options.version}-alllevels`, playtype: "9B", game: "popn", @@ -84,8 +88,8 @@ MutateCollection("tables.json", (tables) => { tables.push({ default: false, - title: `Pop'n Music ${options.version} Levels`, - description: `All pop'n ${options.version} levels, with some folders joined together.`, + title: `Pop'n Music ${fmtVersion} Levels`, + description: `All pop'n ${fmtVersion} levels, with some folders joined together.`, tableID: `popn-9B-${options.version}-levels`, playtype: "9B", game: "popn",