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");