Kelsidavis-WoWee/tools/editor/content_pack.hpp
Kelsi a54ce494be feat(editor): zone validation for open format completeness scoring
- ContentPacker::validateZone() scans a zone directory and checks
  for all open format files (WOT, WHM, PNG, WOM, zone.json, etc.)
- openFormatScore(): returns 0-5 based on how many open formats present
- summary(): human-readable list of found formats
- Foundation for quality gate on WCP export: warn if zone uses
  Blizzard formats that could be converted to open versions
2026-05-05 10:38:57 -07:00

50 lines
1.5 KiB
C++

#pragma once
#include <string>
#include <vector>
#include <cstdint>
namespace wowee {
namespace editor {
struct ContentPackInfo {
std::string name;
std::string author;
std::string description;
std::string version = "1.0";
uint32_t mapId = 9000;
std::string format = "wcp-1.0";
struct FileEntry {
std::string path; // path inside pack
std::string category; // terrain, object, creature, quest, texture, model
uint64_t size = 0;
};
std::vector<FileEntry> files;
};
class ContentPacker {
public:
// Pack all zone data from output directory into a .wcp file
static bool packZone(const std::string& outputDir, const std::string& mapName,
const std::string& destPath, const ContentPackInfo& info);
// Unpack a .wcp file to a directory
static bool unpackZone(const std::string& wcpPath, const std::string& destDir);
// Read pack info without extracting
static bool readInfo(const std::string& wcpPath, ContentPackInfo& info);
// Validate that a zone directory has all required open format files
struct ValidationResult {
bool hasWot = false, hasWhm = false, hasZoneJson = false;
bool hasPng = false, hasWom = false, hasCreatures = false;
bool hasQuests = false, hasObjects = false;
int openFormatScore() const;
std::string summary() const;
};
static ValidationResult validateZone(const std::string& zoneDir);
};
} // namespace editor
} // namespace wowee