diff --git a/scripts/parse-egg-moves/egg-move-template.boilerplate.ts b/scripts/parse-egg-moves/egg-move-template.boilerplate.ts index bfac05f4bde..8b7a64f3ebd 100644 --- a/scripts/parse-egg-moves/egg-move-template.boilerplate.ts +++ b/scripts/parse-egg-moves/egg-move-template.boilerplate.ts @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024-2025 Pagefault Games + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + //! DO NOT EDIT THIS FILE - CREATED BY THE `eggMoves:parse` script automatically import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; diff --git a/scripts/parse-egg-moves/egg-move-template.boilerplate.ts.license b/scripts/parse-egg-moves/egg-move-template.boilerplate.ts.license deleted file mode 100644 index ce549b94a45..00000000000 --- a/scripts/parse-egg-moves/egg-move-template.boilerplate.ts.license +++ /dev/null @@ -1,4 +0,0 @@ -SPDX-FileCopyrightText: 2025 Pagefault Games -SPDX-FileContributor: Bertie690 - -SPDX-License-Identifier: AGPL-3.0-only diff --git a/scripts/parse-egg-moves/interactive.js b/scripts/parse-egg-moves/interactive.js index f915b69f662..8e0f5e68d24 100644 --- a/scripts/parse-egg-moves/interactive.js +++ b/scripts/parse-egg-moves/interactive.js @@ -32,7 +32,7 @@ export async function runInteractive() { if (answer === "Exit") { console.log("Exiting..."); - process.exitCode = 1; + process.exitCode = 0; return { type: "Exit" }; } diff --git a/scripts/parse-egg-moves/main.js b/scripts/parse-egg-moves/main.js index dd4fafb45cb..ed7028a4ff3 100644 --- a/scripts/parse-egg-moves/main.js +++ b/scripts/parse-egg-moves/main.js @@ -18,7 +18,7 @@ import { showHelpText } from "./help-message.js"; import { runInteractive } from "./interactive.js"; import { parseEggMoves } from "./parse.js"; -const version = "1.0.0"; +const version = "1.0.1"; // Get the directory name of the current module file const __filename = fileURLToPath(import.meta.url); @@ -54,8 +54,8 @@ async function start() { let csv = ""; const inputType = await parseArguments(); - if (process.exitCode) { - // If exit code is non-zero, return to allow it to propagate up the chain. + // If exit code was set, return to allow it to propagate it up the chain. + if (process.exitCode != null) { return; } switch (inputType.type) { @@ -66,7 +66,6 @@ async function start() { csv = await fs.promises.readFile(inputType.value, "utf-8"); break; case "Exit": - // Help screen triggered; break out return; } @@ -80,8 +79,10 @@ async function start() { async function parseArguments() { const args = process.argv.slice(2); // first 2 args are node and script name (irrelevant) + // Yoink everything up to the first "=" to get the raw command, using nullish coaclescing to convert + // "no args" into "undefined" /** @type {string | undefined} */ - const arg = args[0].split("=")[0]; // Yoink everything up to the first "=" to get the raw command + const arg = args[0]?.split("=")[0]; switch (arg) { case "-f": case "--file": diff --git a/src/data/balance/egg-moves.ts b/src/data/balance/egg-moves.ts index f43ee573207..bb656174879 100644 --- a/src/data/balance/egg-moves.ts +++ b/src/data/balance/egg-moves.ts @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024-2025 Pagefault Games + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + //! DO NOT EDIT THIS FILE - CREATED BY THE `eggMoves:parse` script automatically import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id";