From ea261a039dbff14401d298d3ab3d7831cfd7211c Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:08:30 +0800 Subject: [PATCH 1/2] [Refactor] Cleanup test boilerplate script (#4547) --- create-test-boilerplate.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/create-test-boilerplate.js b/create-test-boilerplate.js index 6d9cde966d5..5f4bbc41198 100644 --- a/create-test-boilerplate.js +++ b/create-test-boilerplate.js @@ -1,9 +1,7 @@ /** - * This script creates a test boilerplate file for a move or ability. - * @param {string} type - The type of test to create. Either "move", "ability", - * or "item". - * @param {string} fileName - The name of the file to create. - * @example npm run create-test move tackle + * This script creates a test boilerplate file in the appropriate + * directory based on the type selected. + * @example npm run create-test */ import fs from "fs"; @@ -34,7 +32,7 @@ async function promptTestType() { console.log("Exiting..."); return process.exit(); } else if (!typeChoices.includes(typeAnswer.selectedOption)) { - console.error('Please provide a valid type ("move", "ability", or "item")!'); + console.error(`Please provide a valid type (${typeChoices.join(", ")})!`); return await promptTestType(); } @@ -102,7 +100,7 @@ async function runInteractive() { description = `Mystery Encounter - ${formattedName}`; break; default: - console.error('Invalid type. Please use "move", "ability", or "item".'); + console.error(`Invalid type. Please use one of the following: ${typeChoices.join(", ")}.`); process.exit(1); } From f634b7c0449c5eb29d5c6d3f70d15064f0af9df1 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:13:16 -0700 Subject: [PATCH 2/2] [Misc] Disable some leftover debug code (#4546) * Disable i18n debug in `.env` files * Disable leftover ME debug code --- .env.beta | 2 +- .env.development | 2 +- src/data/mystery-encounters/mystery-encounters.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.beta b/.env.beta index 38888ec3d97..c4a7c154ffe 100644 --- a/.env.beta +++ b/.env.beta @@ -3,4 +3,4 @@ VITE_BYPASS_TUTORIAL=0 VITE_SERVER_URL=https://apibeta.pokerogue.net VITE_DISCORD_CLIENT_ID=1248062921129459756 VITE_GOOGLE_CLIENT_ID=955345393540-2k6lfftf0fdnb0krqmpthjnqavfvvf73.apps.googleusercontent.com -VITE_I18N_DEBUG=1 +VITE_I18N_DEBUG=0 diff --git a/.env.development b/.env.development index 6c92036270f..e4e5053016f 100644 --- a/.env.development +++ b/.env.development @@ -3,5 +3,5 @@ VITE_BYPASS_TUTORIAL=0 VITE_SERVER_URL=http://localhost:8001 VITE_DISCORD_CLIENT_ID=1234567890 VITE_GOOGLE_CLIENT_ID=1234567890 -VITE_I18N_DEBUG=1 +VITE_I18N_DEBUG=0 VITE_PORT=8000 diff --git a/src/data/mystery-encounters/mystery-encounters.ts b/src/data/mystery-encounters/mystery-encounters.ts index 14fd5d7d6d1..8fde06f3b14 100644 --- a/src/data/mystery-encounters/mystery-encounters.ts +++ b/src/data/mystery-encounters/mystery-encounters.ts @@ -363,6 +363,7 @@ export function initMysteryEncounters() { }); // Add ANY biome encounters to biome map + // eslint-disable-next-line let encounterBiomeTableLog = ""; mysteryEncountersByBiome.forEach((biomeEncounters, biome) => { anyBiomeEncounters.forEach(encounter => { @@ -374,5 +375,5 @@ export function initMysteryEncounters() { encounterBiomeTableLog += `${getBiomeName(biome).toUpperCase()}: [${biomeEncounters.map(type => MysteryEncounterType[type].toString().toLowerCase()).sort().join(", ")}]\n`; }); - console.debug("All Mystery Encounters by Biome:\n" + encounterBiomeTableLog); + //console.debug("All Mystery Encounters by Biome:\n" + encounterBiomeTableLog); }