feat(editor): object save/load JSON, working duplicate, export objects

- Object placer save/load: objects.json persists placed M2/WMO objects
  across sessions (path, position, rotation, scale, type)
- Fixed Duplicate button in Object panel: now actually creates a copy
  with correct path/type/scale instead of being a no-op stub
- Export Zone now saves objects.json alongside ADT/WDT/creatures/manifest
- Object JSON loader parses all fields for full round-trip
This commit is contained in:
Kelsi 2026-05-05 05:14:03 -07:00
parent 8341fb6dc9
commit 8c9407e0f5
4 changed files with 104 additions and 5 deletions

View file

@ -597,6 +597,12 @@ void EditorApp::exportZone(const std::string& outputDir) {
npcSpawner_.saveToFile(npcPath);
}
// Save placed objects
if (objectPlacer_.objectCount() > 0) {
std::string objPath = base + "/objects.json";
objectPlacer_.saveToFile(objPath);
}
// Write zone manifest (for client loading)
ZoneManifest manifest;
manifest.mapName = loadedMap_;