mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 11:33:52 +00:00
refactor(editor): extract clone-* duplicate handlers into cli_clone.cpp
Moves the three clone-* handlers (--clone-quest,
--clone-creature, --clone-object) out of main.cpp into a new
cli_clone.{hpp,cpp} module. All three deep-copy by index,
optionally rename, and (for creature/object) offset the new
copy by 5 yards along X to prevent z-fighting with the
original. Each resets the per-entity unique id so downstream
systems that dedupe by id stay consistent.
main.cpp shrinks by 184 lines (6,315 to 6,131).
This commit is contained in:
parent
56cad647b0
commit
3fdf75a03b
4 changed files with 255 additions and 188 deletions
20
tools/editor/cli_clone.hpp
Normal file
20
tools/editor/cli_clone.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
namespace wowee {
|
||||
namespace editor {
|
||||
namespace cli {
|
||||
|
||||
// Dispatch the clone-* duplicate handlers — deep-copy a quest /
|
||||
// creature spawn / object placement by index, optionally
|
||||
// renaming and offsetting the new copy. Useful for templating
|
||||
// patterns: design once, clone N times.
|
||||
// --clone-quest duplicate a quest with all objectives + rewards
|
||||
// --clone-creature duplicate a spawn (default 5-yard X offset)
|
||||
// --clone-object duplicate an object placement (5-yard X offset)
|
||||
//
|
||||
// Returns true if matched; outRc holds the exit code.
|
||||
bool handleClone(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