Kelsidavis-WoWee/tools/editor/cli_zone_mgmt.hpp
Kelsi d91b0b31c5 refactor(editor): extract zone lifecycle handlers into cli_zone_mgmt.cpp
Moves the four zone-level lifecycle handlers (--copy-zone,
--rename-zone, --remove-zone, --clear-zone-content) out of
main.cpp into a new cli_zone_mgmt.{hpp,cpp} module. All slug-
aware: copy + rename keep file names and manifest mapName in
sync so the result is self-consistent; clear-content empties
the per-feature JSONs without touching terrain.

main.cpp shrinks by 321 lines (4,431 to 4,110).
2026-05-09 08:52:19 -07:00

21 lines
747 B
C++

#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the zone-level lifecycle handlers — copy, rename,
// remove, and clear-content operations on whole zone
// directories. All slug-aware (file rename and manifest
// mapName stay in sync) so the result is self-consistent.
// --copy-zone duplicate a zone with a fresh slug
// --rename-zone change a zone's slug + rename files
// --remove-zone delete a zone directory (with confirmation)
// --clear-zone-content empty creatures/objects/quests/items
//
// Returns true if matched; outRc holds the exit code.
bool handleZoneMgmt(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee