mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): Export Content Pack button in File menu
- File > Export Content Pack (.wcp) saves zone + packs into WCP archive - Auto-saves zone first, then bundles into the novel WCP format - WCP is a custom format unique to wowee (not MPQ, not CASC) - Output: output/MapName.wcp ready for distribution - Toast notification on success/failure
This commit is contained in:
parent
79ae91a6d5
commit
be18ceea73
3 changed files with 23 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "editor_app.hpp"
|
||||
#include "adt_writer.hpp"
|
||||
#include "zone_manifest.hpp"
|
||||
#include "content_pack.hpp"
|
||||
#include "core/coordinates.hpp"
|
||||
#include "rendering/vk_context.hpp"
|
||||
#include "pipeline/adt_loader.hpp"
|
||||
|
|
@ -762,6 +763,23 @@ void EditorApp::exportZone(const std::string& outputDir) {
|
|||
LOG_INFO("Zone exported to: ", base);
|
||||
}
|
||||
|
||||
void EditorApp::exportContentPack(const std::string& destPath) {
|
||||
if (!terrain_.isLoaded()) return;
|
||||
// Save zone first
|
||||
std::string dir = lastSavePath_.empty() ? "output" : lastSavePath_;
|
||||
exportZone(dir);
|
||||
// Pack into WCP
|
||||
ContentPackInfo info;
|
||||
info.name = loadedMap_;
|
||||
info.author = "Kelsi Davis";
|
||||
info.description = "Custom zone created with Wowee World Editor";
|
||||
info.mapId = 9000;
|
||||
if (ContentPacker::packZone(dir, loadedMap_, destPath, info))
|
||||
showToast("Content pack exported: " + destPath);
|
||||
else
|
||||
showToast("Failed to create content pack");
|
||||
}
|
||||
|
||||
void EditorApp::quickSave() {
|
||||
if (!terrain_.isLoaded()) return;
|
||||
std::string dir = lastSavePath_.empty() ? "output" : lastSavePath_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue