mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 11:03:51 +00:00
feat(editor): add --list-packs introspection + --gen-temple-pack
Two related changes:
• --list-packs walks kArgRequired and surfaces every flag
matching --gen-*-pack (excluding --gen-mesh-* and
--gen-texture-* which are individual primitives). Sister
command to --list-primitives. Auto-tracks new packs as
they're added — no parallel registry.
• --gen-temple-pack composite — temple/shrine ritual hall
(altar + shrine + brazier + pillar + statue + portal +
podium). Fourth themed mesh pack after camp / blacksmith /
village.
list-packs now surfaces 9 composites including the pre-
existing zone-* / project-starter packs that match the
naming convention. All 7 temple-pack outputs validate clean.
This commit is contained in:
parent
c18d88015a
commit
4e64f833a7
4 changed files with 50 additions and 0 deletions
|
|
@ -371,6 +371,30 @@ int handleVersion(int& /*i*/, int /*argc*/, char** /*argv*/) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int handleListPacks(int& /*i*/, int /*argc*/, char** /*argv*/) {
|
||||
// Sister to --list-primitives: lists every --gen-*-pack
|
||||
// composite flag from the shared kArgRequired registry.
|
||||
// Auto-tracks new packs as they're added — no parallel list.
|
||||
std::vector<std::string> packs;
|
||||
for (std::size_t k = 0; k < kArgRequiredSize; ++k) {
|
||||
const char* flag = kArgRequired[k];
|
||||
std::size_t len = std::strlen(flag);
|
||||
// Match --gen-*-pack (anything starting with --gen- and
|
||||
// ending in -pack, but NOT --gen-mesh-* or --gen-texture-*
|
||||
// which are individual primitives).
|
||||
if (std::strncmp(flag, "--gen-", 6) != 0) continue;
|
||||
if (std::strncmp(flag, "--gen-mesh-", 11) == 0) continue;
|
||||
if (std::strncmp(flag, "--gen-texture-", 14) == 0) continue;
|
||||
if (len > 5 && std::strcmp(flag + len - 5, "-pack") == 0) {
|
||||
packs.emplace_back(flag);
|
||||
}
|
||||
}
|
||||
std::sort(packs.begin(), packs.end());
|
||||
std::printf("Composite packs (%zu):\n", packs.size());
|
||||
for (const auto& p : packs) std::printf(" %s\n", p.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
int handleListPrimitives(int& i, int argc, char** argv) {
|
||||
// Focused subset of --list-commands: just the procedural
|
||||
// primitives (--gen-mesh-* and --gen-texture-* flags). Useful
|
||||
|
|
@ -434,6 +458,9 @@ bool handleIntrospect(int& i, int argc, char** argv, int& outRc) {
|
|||
if (std::strcmp(argv[i], "--list-primitives") == 0) {
|
||||
outRc = handleListPrimitives(i, argc, argv); return true;
|
||||
}
|
||||
if (std::strcmp(argv[i], "--list-packs") == 0) {
|
||||
outRc = handleListPacks(i, argc, argv); return true;
|
||||
}
|
||||
if (std::strcmp(argv[i], "--info-cli-stats") == 0) {
|
||||
outRc = handleInfoCliStats(i, argc, argv); return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue