From 2e973c0f004430b12e5ff1959750b1e9e7750ef4 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 9 May 2026 13:40:18 -0700 Subject: [PATCH] feat(editor): add --gen-mining-pack composite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ninth themed mesh pack after camp / blacksmith / village / temple / graveyard / garden / dock / tavern. Mining-shaft / quarry-floor scene emitting a 7-primitive working-mine layout: • gravel-pile — loose rubble from the dig • crate-stack — raw-ore cargo waiting for transport • mine-cart — underground transport • pillar-row — roof support pillars (the colonnade pattern reads as mine-shaft supports underground) • lantern — light source • workbench — assay / sorting station • hitching-post — mule / cart tie Together these form a complete working-mine entrance / quarry-floor layout. Uses 3 primitives newly added in recent batches (mine-cart, pillar-row, lantern). Composite-pack catalogue: camp + blacksmith + village + temple + graveyard + garden + dock + tavern + mining = 9 themed mesh packs. --list-packs surfaces 14 total including the pre-existing zone/project starters. --- tools/editor/cli_arg_required.cpp | 1 + tools/editor/cli_gen_mesh.cpp | 20 ++++++++++++++++++++ tools/editor/cli_help.cpp | 2 ++ 3 files changed, 23 insertions(+) diff --git a/tools/editor/cli_arg_required.cpp b/tools/editor/cli_arg_required.cpp index fd6181e0..c9cc697f 100644 --- a/tools/editor/cli_arg_required.cpp +++ b/tools/editor/cli_arg_required.cpp @@ -65,6 +65,7 @@ const char* const kArgRequired[] = { "--gen-camp-pack", "--gen-blacksmith-pack", "--gen-village-pack", "--gen-temple-pack", "--gen-graveyard-pack", "--gen-garden-pack", "--gen-dock-pack", "--gen-tavern-pack", + "--gen-mining-pack", "--gen-mesh-table", "--gen-mesh-lamppost", "--gen-mesh-bed", "--gen-mesh-ladder", "--gen-mesh-well", "--gen-mesh-signpost", "--gen-mesh-mailbox", "--gen-mesh-tombstone", "--gen-mesh-crate", diff --git a/tools/editor/cli_gen_mesh.cpp b/tools/editor/cli_gen_mesh.cpp index c2a88251..dc4e01e8 100644 --- a/tools/editor/cli_gen_mesh.cpp +++ b/tools/editor/cli_gen_mesh.cpp @@ -7069,6 +7069,25 @@ int handleGenBlacksmithPack(int& i, int /*argc*/, char** argv) { }); } +int handleGenMiningPack(int& i, int /*argc*/, char** argv) { + // Mining shaft / quarry scene: gravel-pile (loose rubble), + // crate-stack (raw-ore cargo), mine-cart (underground + // transport), pillar-row (roof supports), lantern (light + // source), workbench (assay / sorting station), hitching- + // post (mule / cart tie). Together these form a complete + // working mine entrance / quarry-floor layout. + std::string outDir = argv[++i]; + return emitMeshPack(outDir, "mining pack", { + {"--gen-mesh-gravel-pile", handleGravelPile, "gravel"}, + {"--gen-mesh-crate-stack", handleCrateStack, "crates"}, + {"--gen-mesh-mine-cart", handleMineCart, "cart"}, + {"--gen-mesh-pillar-row", handlePillarRow, "pillars"}, + {"--gen-mesh-lantern", handleLantern, "lantern"}, + {"--gen-mesh-workbench", handleWorkbench, "workbench"}, + {"--gen-mesh-hitching-post", handleHitchingPost, "hitching"}, + }); +} + int handleGenTavernPack(int& i, int /*argc*/, char** argv) { // Inn / tavern scene: house (the inn building), chimney // (above the kitchen hearth), table + bench (the common @@ -7270,6 +7289,7 @@ constexpr MeshEntry kMeshTable[] = { {"--gen-garden-pack", 1, handleGenGardenPack}, {"--gen-dock-pack", 1, handleGenDockPack}, {"--gen-tavern-pack", 1, handleGenTavernPack}, + {"--gen-mining-pack", 1, handleGenMiningPack}, {"--gen-mesh-table", 1, handleTable}, {"--gen-mesh-lamppost", 1, handleLamppost}, {"--gen-mesh-bed", 1, handleBed}, diff --git a/tools/editor/cli_help.cpp b/tools/editor/cli_help.cpp index 30901813..4ee979bb 100644 --- a/tools/editor/cli_help.cpp +++ b/tools/editor/cli_help.cpp @@ -330,6 +330,8 @@ void printUsage(const char* argv0) { std::printf(" Convenience: emit dock + crate-stack + barrel + canopy + bench + signpost + hitching-post into outDir\n"); std::printf(" --gen-tavern-pack \n"); std::printf(" Convenience: emit house + chimney + table + bench + barrel + bookshelf + signpost into outDir\n"); + std::printf(" --gen-mining-pack \n"); + std::printf(" Convenience: emit gravel-pile + crate-stack + mine-cart + pillar-row + lantern + workbench + hitching-post\n"); std::printf(" --gen-mesh-table [width] [depth] [height] [legThick] [topThick]\n"); std::printf(" Table: flat top slab on 4 corner legs (default 1.6/1.0/0.85/0.10/0.06)\n"); std::printf(" --gen-mesh-lamppost [poleH] [poleT] [baseSize] [lanternSize] [lanternH]\n");