mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
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).
This commit is contained in:
parent
98e3bbd58c
commit
d91b0b31c5
4 changed files with 403 additions and 325 deletions
21
tools/editor/cli_zone_mgmt.hpp
Normal file
21
tools/editor/cli_zone_mgmt.hpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue