feat(editor): zone manifest for client loading, export workflow complete

- Zone manifest (zone.json): generated on export with map name, map ID,
  tile list, biome, creature flag, and file paths. This is what the
  wowee client will read to discover and load custom zones.
- Export workflow now produces a complete loadable zone package:
  zone.json + MapName.wdt + MapName_X_Y.adt + creatures.json
- ZoneManifest class with save/load (JSON format)
- Custom map IDs start at 9000+ to avoid conflicting with retail maps
- New Terrain dialog shows helper text for map name format
This commit is contained in:
Kelsi 2026-05-05 05:06:41 -07:00
parent 3d6c508491
commit e0d14de5d2
6 changed files with 117 additions and 1 deletions

View file

@ -1,5 +1,6 @@
#include "editor_app.hpp"
#include "adt_writer.hpp"
#include "zone_manifest.hpp"
#include "rendering/vk_context.hpp"
#include "pipeline/adt_loader.hpp"
#include "pipeline/terrain_mesh.hpp"
@ -596,6 +597,15 @@ void EditorApp::exportZone(const std::string& outputDir) {
npcSpawner_.saveToFile(npcPath);
}
// Write zone manifest (for client loading)
ZoneManifest manifest;
manifest.mapName = loadedMap_;
manifest.displayName = loadedMap_;
manifest.tiles.push_back({loadedTileX_, loadedTileY_});
manifest.hasCreatures = (npcSpawner_.spawnCount() > 0);
manifest.baseHeight = terrain_.chunks[0].position[2];
manifest.save(base + "/zone.json");
lastSavePath_ = outputDir;
showToast("Zone exported to " + base);
LOG_INFO("Zone exported to: ", base);