diff options
| author | Pepper0ni <93387759+Pepper0ni@users.noreply.github.com> | 2025-05-27 21:19:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-27 13:19:30 -0700 |
| commit | f0e36c2694fe004cbadaa45d9149c8b67c8eba88 (patch) | |
| tree | 9002e695fd7be37b50c1936b929550c5a508bf80 | |
| parent | de96f3cd0a7f6d6adf4bf7e20719f0ef7b843843 (diff) | |
Fix failure to assign areas to regions on initial spoiler load (#5540)
| -rw-r--r-- | soh/soh/Enhancements/randomizer/3drando/fill.hpp | 1 | ||||
| -rw-r--r-- | soh/soh/Enhancements/randomizer/context.cpp | 2 | ||||
| -rw-r--r-- | soh/soh/Enhancements/randomizer/entrance.cpp | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.hpp b/soh/soh/Enhancements/randomizer/3drando/fill.hpp index 67043952f..e8124c0dc 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.hpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.hpp @@ -56,6 +56,7 @@ struct GetAccessibleLocationsStruct { void ClearProgress(); void VanillaFill(); int Fill(); +void SetAreas(); std::vector<RandomizerCheck> GetEmptyLocations(std::vector<RandomizerCheck> allowedLocations); diff --git a/soh/soh/Enhancements/randomizer/context.cpp b/soh/soh/Enhancements/randomizer/context.cpp index 7178dd18d..550cd0e93 100644 --- a/soh/soh/Enhancements/randomizer/context.cpp +++ b/soh/soh/Enhancements/randomizer/context.cpp @@ -400,9 +400,9 @@ void Context::ParseSpoiler(const char* spoilerFileName) { ParseHashIconIndexesJson(spoilerFileJson); Rando::Settings::GetInstance()->ParseJson(spoilerFileJson); ParseItemLocationsJson(spoilerFileJson); - ParseHintJson(spoilerFileJson); ParseTricksJson(spoilerFileJson); mEntranceShuffler->ParseJson(spoilerFileJson); + ParseHintJson(spoilerFileJson); mDungeons->ParseJson(spoilerFileJson); mTrials->ParseJson(spoilerFileJson); mSpoilerLoaded = true; diff --git a/soh/soh/Enhancements/randomizer/entrance.cpp b/soh/soh/Enhancements/randomizer/entrance.cpp index 45cde2f6f..ea9b80ee3 100644 --- a/soh/soh/Enhancements/randomizer/entrance.cpp +++ b/soh/soh/Enhancements/randomizer/entrance.cpp @@ -1666,6 +1666,10 @@ void EntranceShuffler::ParseJson(nlohmann::json spoilerFileJson) { } } } catch (const std::exception& e) { throw e; } + // We may need to reset more things here or elsewhere in spoiler loading + RegionTable_Init(); + ApplyEntranceOverrides(); + SetAreas(); } void EntranceShuffler::ApplyEntranceOverrides() { |
