Kelsidavis-WoWee/tools/editor/cli_random.hpp
Kelsi 05350becbc refactor(editor): extract random-* / gen-random-* into cli_random.cpp
Moves the four random-population handlers (--random-populate-zone,
--random-populate-items, --gen-random-zone, --gen-random-project)
out of main.cpp into a new cli_random.{hpp,cpp} module. All four
use the same seeded LCG so re-runs reproduce the same content;
the gen-random-* pair shells out to scaffold-zone +
random-populate-zone + random-populate-items so the simpler
single-purpose handlers stay the source of truth.

main.cpp shrinks by 439 lines (5,788 to 5,349). The inline word
lexicons (creature names, object paths, item prefixes/nouns) move
with random-populate-zone and -items into the new module.
2026-05-09 08:22:06 -07:00

21 lines
768 B
C++

#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the random-* / gen-random-* zone-population handlers.
// All four use a seeded LCG so re-runs reproduce the same
// content; they're intended for playtest scenarios where you
// want bulk-populated zones without hand-typing every spawn.
// --random-populate-zone add N creatures + M objects to a zone
// --random-populate-items add N item records to items.json
// --gen-random-zone scaffold + populate + items in one shot
// --gen-random-project spawn N gen-random-zones in a raster
//
// Returns true if matched; outRc holds the exit code.
bool handleRandom(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee