diff --git a/src/dusk/imgui/ImGuiMenuRandomizer.cpp b/src/dusk/imgui/ImGuiMenuRandomizer.cpp index 3070bbfc0e..c4144551dc 100644 --- a/src/dusk/imgui/ImGuiMenuRandomizer.cpp +++ b/src/dusk/imgui/ImGuiMenuRandomizer.cpp @@ -252,7 +252,7 @@ namespace dusk { // Show total number of available locations auto locations = trackerRando->GetWorld()->GetAllLocations(); auto numProgressionLocations = std::ranges::count_if(locations, [](auto* location) {return location->IsProgression();}); - auto numAvailableLocations = m_currentSearch._visitedLocations.size(); + auto numAvailableLocations = std::ranges::count_if(m_currentSearch._visitedLocations, [](auto* location) {return location->IsProgression();}); ImGui::Text("Locations Available: %zu / %zu", numAvailableLocations, numProgressionLocations); if (ImGui::BeginChild("ScrollRegion", ImVec2(500, 500), true)) diff --git a/src/dusk/randomizer/generator/logic/location.hpp b/src/dusk/randomizer/generator/logic/location.hpp index 9244ab3d68..5e92c53342 100644 --- a/src/dusk/randomizer/generator/logic/location.hpp +++ b/src/dusk/randomizer/generator/logic/location.hpp @@ -58,9 +58,9 @@ namespace randomizer::logic::location void SetRegisteredLocationCategories(std::unordered_set* registeredLocationCategories); /** - * @brief Checks to see if the location has all the passed in categories. If a passed in category was never registred, + * @brief Checks to see if the location has all the passed in categories. If a passed in category was never registered, * a std::runtime_error will be thrown. - * @param categoryNames paramater pack of string representations of category names + * @param categoryNames parameter pack of string representations of category names * @returns true if all passed in categories are present, false otherwise */ template diff --git a/src/dusk/randomizer/generator/logic/world.cpp b/src/dusk/randomizer/generator/logic/world.cpp index 4a9673272b..6fe1aa574e 100644 --- a/src/dusk/randomizer/generator/logic/world.cpp +++ b/src/dusk/randomizer/generator/logic/world.cpp @@ -645,6 +645,33 @@ namespace randomizer::logic::world } } + void World::SetTrackerNonProgressLocations() { + for (auto& [locationName, location] : this->_locationTable) { + auto originalItemName = location->GetOriginalItem()->GetName(); + // Poe Souls + if ((originalItemName == "Poe Soul" && + (this->Setting("Poe Souls") == "Vanilla" || + (this->Setting("Poe Souls") == "Dungeon" && location->HasCategories("Overworld")) || + (this->Setting("Poe Souls") == "Overworld" && location->HasCategories("Dungeon")))) || + // Vanilla Golden Bugs + (this->Setting("Golden Bugs") == "Off" && location->HasCategories("Golden Bug")) || + // Sky Characters + (this->Setting("Sky Characters") == "Off" && location->HasCategories("Sky Character")) || + // NPC Gifts + (this->Setting("Gifts From NPCs") == "Off" && location->HasCategories("Npc")) || + // Shop Items + (this->Setting("Shop Items") == "Off" && location->HasCategories("Shop")) || + // Hidden Skills + (this->Setting("Hidden Skills") == "Off" && location->HasCategories("Golden Wolf")) || + // Hidden Rupees + (this->Setting("Hidden Rupees") == "Off" && location->HasCategories("Rupee - Hidden")) || + // Freestanding Rupees + (this->Setting("Freestanding Rupees") == "Off" && location->HasCategories("Rupee - Freestanding"))) { + location->SetProgression(false); + } + } + } + void World::PerformPostEntranceShuffleTasks() { this->AssignAreaProperties(); diff --git a/src/dusk/randomizer/generator/logic/world.hpp b/src/dusk/randomizer/generator/logic/world.hpp index efbbc3f422..ab43211e10 100644 --- a/src/dusk/randomizer/generator/logic/world.hpp +++ b/src/dusk/randomizer/generator/logic/world.hpp @@ -71,6 +71,7 @@ namespace randomizer::logic::world void PlaceVanillaItems(); void PlacePlandomizerItems(); void SetNonProgressLocations(); + void SetTrackerNonProgressLocations(); /** * @brief Perform all tasks which require shuffled entrances to be set, but before running the main item placement diff --git a/src/dusk/randomizer/generator/randomizer.cpp b/src/dusk/randomizer/generator/randomizer.cpp index 96403eb017..7e63e427d0 100644 --- a/src/dusk/randomizer/generator/randomizer.cpp +++ b/src/dusk/randomizer/generator/randomizer.cpp @@ -64,6 +64,7 @@ namespace randomizer auto trackerWorld = this->_worlds.at(0).get(); trackerWorld->SetNonProgressLocations(); + trackerWorld->SetTrackerNonProgressLocations(); trackerWorld->AssignAreaProperties(); trackerWorld->AssignGoalLocations();