Exclude locations fix (#4969)

* Properly check for Excluded Location option.

* Remove GetOption overloads, weren't working anyway
This commit is contained in:
Christopher Leggett 2025-01-29 10:12:42 -05:00 committed by GitHub
parent 1f65bde583
commit 7df9641297
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 11 deletions

View File

@ -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;
}

View File

@ -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];
}

View File

@ -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);