feat(editor): add --gen-village-pack composite

Third composite pack (after --gen-camp-pack and
--gen-blacksmith-pack), emitting a 7-primitive village-square
scene into <outDir>:

  • 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.
This commit is contained in:
Kelsi 2026-05-09 12:45:25 -07:00
parent ca38f77fd0
commit 790fe64824
3 changed files with 23 additions and 1 deletions

View file

@ -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",

View file

@ -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},

View file

@ -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 <outDir>\n");
std::printf(" Convenience: emit forge + anvil + workbench + water-trough + crate-stack + hitching-post into outDir\n");
std::printf(" --gen-village-pack <outDir>\n");
std::printf(" Convenience: emit house + outhouse + chimney + hitching-post + well + signpost + haystack into outDir\n");
std::printf(" --gen-mesh-table <wom-base> [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 <wom-base> [poleH] [poleT] [baseSize] [lanternSize] [lanternH]\n");