fix(editor): harden JSON handling, quest loading, and content validation

- Quest editor: add loadFromFile() with nlohmann/json, chain validation
  with circular reference detection, wire into ADT load and save pipeline
- Project: replace naive substring JSON parsing with nlohmann/json for
  both save() and load(), fix shell injection in gitCommit()
- Content pack: replace manual JSON with nlohmann/json, validate binary
  format magic numbers (WHM1/WOM1/WOB1), add WOB to openFormatScore
  (now scores 0-6), mark invalid files with (!) in summary
This commit is contained in:
Kelsi 2026-05-05 12:48:50 -07:00
parent 4fc0361f7a
commit 2eec089ef5
6 changed files with 265 additions and 153 deletions

View file

@ -54,6 +54,11 @@ public:
size_t questCount() const { return quests_.size(); }
bool saveToFile(const std::string& path) const;
bool loadFromFile(const std::string& path);
void clear() { quests_.clear(); nextId_ = 1; }
// Quest chain validation
bool validateChains(std::vector<std::string>& errors) const;
Quest& getTemplate() { return template_; }