Fix incorrect saving of custom encounters data

This commit is contained in:
GriffinR 2025-12-31 19:34:00 -05:00
parent 490af73267
commit 9c1435b9fa
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project somewhat adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The MAJOR version number is bumped when there are **"Breaking Changes"** in the pret projects. For more on this, see [the manual page on breaking changes](https://huderlem.github.io/porymap/manual/breaking-changes.html).
## [Unreleased]
Nothing, yet.
### Fixed
- Fix custom top-level data in the `encounters` object of `wild_encounters.json` being discarded if no `fields` data is present.
## [6.3.0] - 2025-12-26
### Added

View File

@ -1023,10 +1023,9 @@ bool Project::saveWildMonData() {
}
monInfoObject["mons"] = monArray;
OrderedJson::append(&monInfoObject, monInfo.customData);
encounterObject[fieldName] = monInfoObject;
OrderedJson::append(&encounterObject, encounterHeader.customData);
}
OrderedJson::append(&encounterObject, encounterHeader.customData);
encountersArray.push_back(encounterObject);
}
}