diff options
| author | Malkierian <malkierian@gmail.com> | 2024-10-27 09:02:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-27 09:02:51 -0700 |
| commit | 169e39ebada4a2c3d28c69ed646ca838245cd74b (patch) | |
| tree | 87e6c54d8aa5af5aee7cc697fe795e222cb5df9c | |
| parent | 804584e79d1b43c58f1b1795b4d832870f1cc15b (diff) | |
Adds item names to filtered parameters. (#4485)
| -rw-r--r-- | soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp index f57aefc32..f252e7a93 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp @@ -1064,12 +1064,22 @@ bool UpdateFilters() { } bool ShouldShowCheck(RandomizerCheck check) { + auto itemLoc = Rando::Context::GetInstance()->GetItemLocation(check); + std::string search = (Rando::StaticData::GetLocation(check)->GetShortName() + " " + + Rando::StaticData::GetLocation(check)->GetName() + " " + + RandomizerCheckObjects::GetRCAreaName(Rando::StaticData::GetLocation(check)->GetArea())); + if (itemLoc->HasObtained() || itemLoc->GetCheckStatus() == RCSHOW_SCUMMED || + (!mystery && (itemLoc->GetCheckStatus() == RCSHOW_IDENTIFIED || itemLoc->GetCheckStatus() == RCSHOW_SEEN) && itemLoc->GetPlacedRandomizerGet() != RG_ICE_TRAP)) { + search += " " + itemLoc->GetPlacedItemName().GetForLanguage(gSaveContext.language); + } else if (itemLoc->GetCheckStatus() == RCSHOW_IDENTIFIED && !mystery) { + search += OTRGlobals::Instance->gRandoContext->overrides[check].GetTrickName().GetForLanguage(gSaveContext.language); + } else if (itemLoc->GetCheckStatus() == RCSHOW_SEEN && !mystery) { + search += Rando::StaticData::RetrieveItem(OTRGlobals::Instance->gRandoContext->overrides[check].LooksLike()).GetName().GetForLanguage(gSaveContext.language); + } return ( - IsVisibleInCheckTracker(check) && + IsVisibleInCheckTracker(check) && (checkSearch.Filters.Size == 0 || - checkSearch.PassFilter((Rando::StaticData::GetLocation(check)->GetShortName() + " " + - Rando::StaticData::GetLocation(check)->GetName() + " " + - RandomizerCheckObjects::GetRCAreaName(Rando::StaticData::GetLocation(check)->GetArea())).c_str())) + checkSearch.PassFilter(search.c_str())) ); } |
