From 790fe64824f0516066da6c4c7bcf6c1533d7e133 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 9 May 2026 12:45:25 -0700 Subject: [PATCH] feat(editor): add --gen-village-pack composite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Third composite pack (after --gen-camp-pack and --gen-blacksmith-pack), emitting a 7-primitive village-square scene into : • house — main dwelling • outhouse — privy beside it • chimney — for the house roof piece • hitching-post — at the hitching rail • well — village square centerpiece • signpost — pointing the way out of town • haystack — from the nearby farm Together these form a recognizable rural-village hub when arranged in a zone. Uses the existing emitMeshPack helper — the new pack is just an 8-line declarative table. All 7 outputs validate clean (--validate-wom PASSED across the board). Composite-pack catalogue now: camp + blacksmith + village. --- tools/editor/cli_arg_required.cpp | 2 +- tools/editor/cli_gen_mesh.cpp | 20 ++++++++++++++++++++ tools/editor/cli_help.cpp | 2 ++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/tools/editor/cli_arg_required.cpp b/tools/editor/cli_arg_required.cpp index 7974e790..561dcd12 100644 --- a/tools/editor/cli_arg_required.cpp +++ b/tools/editor/cli_arg_required.cpp @@ -57,7 +57,7 @@ const char* const kArgRequired[] = { "--gen-mesh-training-dummy", "--gen-mesh-hitching-post", "--gen-mesh-outhouse", "--gen-mesh-forge", "--gen-mesh-archery-target", "--gen-mesh-gravel-pile", - "--gen-camp-pack", "--gen-blacksmith-pack", + "--gen-camp-pack", "--gen-blacksmith-pack", "--gen-village-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 b99526d5..27e0bb11 100644 --- a/tools/editor/cli_gen_mesh.cpp +++ b/tools/editor/cli_gen_mesh.cpp @@ -6663,6 +6663,25 @@ int handleGenBlacksmithPack(int& i, int /*argc*/, char** argv) { }); } +int handleGenVillagePack(int& i, int /*argc*/, char** argv) { + // Village square scene: a small house, an outhouse beside it, + // a chimney for the house roof piece, a hitching post at the + // hitching rail, a well for the village square, a signpost + // pointing the way out, and a haystack from the nearby farm. + // Together these primitives form a recognizable rural-village + // hub when arranged in a zone. + std::string outDir = argv[++i]; + return emitMeshPack(outDir, "village pack", { + {"--gen-mesh-house", handleHouse, "house"}, + {"--gen-mesh-outhouse", handleOuthouse, "outhouse"}, + {"--gen-mesh-chimney", handleChimney, "chimney"}, + {"--gen-mesh-hitching-post", handleHitchingPost, "hitching"}, + {"--gen-mesh-well", handleWell, "well"}, + {"--gen-mesh-signpost", handleSignpost, "signpost"}, + {"--gen-mesh-haystack", handleHaystack, "haystack"}, + }); +} + } // namespace namespace { @@ -6736,6 +6755,7 @@ constexpr MeshEntry kMeshTable[] = { {"--gen-mesh-gravel-pile", 1, handleGravelPile}, {"--gen-camp-pack", 1, handleGenCampPack}, {"--gen-blacksmith-pack", 1, handleGenBlacksmithPack}, + {"--gen-village-pack", 1, handleGenVillagePack}, {"--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 5e7757ce..59cb56eb 100644 --- a/tools/editor/cli_help.cpp +++ b/tools/editor/cli_help.cpp @@ -278,6 +278,8 @@ void printUsage(const char* argv0) { std::printf(" Convenience: emit tent + firepit + bedroll + canopy + woodpile + haystack into outDir as 6 .wom files\n"); std::printf(" --gen-blacksmith-pack \n"); std::printf(" Convenience: emit forge + anvil + workbench + water-trough + crate-stack + hitching-post into outDir\n"); + std::printf(" --gen-village-pack \n"); + std::printf(" Convenience: emit house + outhouse + chimney + hitching-post + well + signpost + haystack into outDir\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");