refactor(editor): extract --list-zones / --zone-stats into cli_zone_list.cpp

Moves the two zone discovery / aggregation handlers
(--list-zones, --zone-stats) out of main.cpp into a new
cli_zone_list.{hpp,cpp} module. The first quickly enumerates
zones across the standard locations (custom_zones, output);
the second walks a project dir computing tile / creature /
quest / per-format byte totals with a per-zone breakdown
table — useful for content-pack release notes and capacity
planning.

main.cpp shrinks by 191 lines (3,624 to 3,433). Both --json
output modes preserved.
This commit is contained in:
Kelsi 2026-05-09 09:09:06 -07:00
parent 47b4501767
commit db8fa0ec5f
4 changed files with 267 additions and 196 deletions

View file

@ -0,0 +1,21 @@
#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the zone discovery / aggregation handlers — list
// every zone in the standard locations, or compute project-
// wide tile / creature / quest / byte totals.
// --list-zones quick name+dir listing across custom_zones/output
// --zone-stats project-wide aggregate with per-zone breakdown
//
// Both support an optional trailing `--json` flag for
// machine-readable reports.
//
// Returns true if matched; outRc holds the exit code.
bool handleZoneList(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee