Skip to content

Commit

Permalink
Exclude locations fix (HarbourMasters#4969)
Browse files Browse the repository at this point in the history
* Properly check for Excluded Location option.

* Remove GetOption overloads, weren't working anyway
  • Loading branch information
leggettc18 authored Jan 29, 2025
1 parent 1f65bde commit 7df9641
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static void WriteExcludedLocations() {

for (size_t i = 1; i < Rando::Settings::GetInstance()->GetExcludeLocationsOptions().size(); i++) {
for (const auto& location : Rando::Settings::GetInstance()->GetExcludeLocationsOptions()[i]) {
if (ctx->GetOption(location->GetKey()).Get() == RO_LOCATION_INCLUDE) {
if (ctx->GetLocationOption(static_cast<RandomizerCheck>(location->GetKey())).Get() == RO_LOCATION_INCLUDE) {
continue;
}

Expand Down
8 changes: 0 additions & 8 deletions soh/soh/Enhancements/randomizer/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,14 +438,6 @@ OptionValue& Context::GetOption(const RandomizerSettingKey key) {
return mOptions[key];
}

OptionValue& Context::GetOption(const RandomizerTrick key) {
return mTrickOptions[key];
}

OptionValue& Context::GetOption(const RandomizerCheck key) {
return itemLocationTable[key].GetExcludedOption();
}

OptionValue& Context::GetTrickOption(const RandomizerTrick key) {
return mTrickOptions[key];
}
Expand Down
2 changes: 0 additions & 2 deletions soh/soh/Enhancements/randomizer/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ class Context {
TrialInfo* GetTrial(TrialKey key) const;
static Sprite* GetSeedTexture(uint8_t index);
OptionValue& GetOption(RandomizerSettingKey key);
OptionValue& GetOption(RandomizerTrick key);
OptionValue& GetOption(RandomizerCheck key);
OptionValue& GetTrickOption(RandomizerTrick key);
OptionValue& GetLocationOption(RandomizerCheck key);

Expand Down

0 comments on commit 7df9641

Please sign in to comment.