mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-30 08:26:24 -04:00
set nonprogress locations in tracker
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -58,9 +58,9 @@ namespace randomizer::logic::location
|
||||
void SetRegisteredLocationCategories(std::unordered_set<std::string>* 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<class... Types>
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace randomizer
|
||||
|
||||
auto trackerWorld = this->_worlds.at(0).get();
|
||||
trackerWorld->SetNonProgressLocations();
|
||||
trackerWorld->SetTrackerNonProgressLocations();
|
||||
trackerWorld->AssignAreaProperties();
|
||||
trackerWorld->AssignGoalLocations();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user