From ba671b6fee1bd3bfe92979f27f550ca33ac65fc5 Mon Sep 17 00:00:00 2001 From: Robert Burnham Date: Wed, 4 Feb 2026 12:32:14 -0600 Subject: [PATCH] Add 'resources' config option to specify selective inclusion of resource files --- .gitignore | 6 ++++++ src/map-parser.ts | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/.gitignore b/.gitignore index 5ede78e..1e374fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,12 @@ +# IDE-specific dirs +.idea/ + dist node_modules /working-files +/test/test_maps/* +!/test/test_maps/barren_2.sd7 +!/test/test_maps/tropical-v2.sdz /tiles /out.png /height.jpg diff --git a/src/map-parser.ts b/src/map-parser.ts index 2028aad..c709688 100644 --- a/src/map-parser.ts +++ b/src/map-parser.ts @@ -53,6 +53,11 @@ export interface MapParserConfig { * @default false */ parseResources: boolean; + /** + * List of specific resources to parse when parseResources: true + * @default undefined + */ + resources?: string[]; } const mapParserDefaultConfig: Partial = { @@ -536,6 +541,9 @@ export class MapParser { if (typeof value !== "string") { continue; } + if (this.config.resources && !this.config.resources.includes(key)) { + continue; + } const filename = path.join(mapArchiveDir, "maps", value);