From 169e39ebada4a2c3d28c69ed646ca838245cd74b Mon Sep 17 00:00:00 2001 From: Malkierian Date: Sun, 27 Oct 2024 09:02:51 -0700 Subject: [PATCH] Adds item names to filtered parameters. (#4485) --- .../randomizer/randomizer_check_tracker.cpp | 18 ++++++++++++++---- 1 file 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())) ); }