Fix excluded locations getting bombchus when bombchu bag is off (#5943)

* Fix bombchus being consistently added to excluded locations

* change to be a random junk item
This commit is contained in:
Pepper0ni
2025-11-09 15:58:18 +00:00
committed by GitHub
parent 0e162cbb7c
commit 3d525d7eb1
3 changed files with 1 additions and 15 deletions

View File

@@ -1018,7 +1018,7 @@ static void FillExcludedLocations() {
FilterFromPool(ctx->allLocations, [ctx](const auto loc) { return ctx->GetItemLocation(loc)->IsExcluded(); });
for (RandomizerCheck loc : excludedLocations) {
PlaceJunkInExcludedLocation(loc);
ctx->PlaceItemInLocation(loc, GetJunkItem());
}
}

View File

@@ -350,19 +350,6 @@ static void ReplaceMaxItem(const RandomizerGet itemToReplace, int max) {
}
}
void PlaceJunkInExcludedLocation(const RandomizerCheck il) {
// place a non-advancement item in this location
auto ctx = Rando::Context::GetInstance();
for (size_t i = 0; i < ItemPool.size(); i++) {
if (Rando::StaticData::RetrieveItem(ItemPool[i]).GetCategory() == ITEM_CATEGORY_JUNK) {
ctx->PlaceItemInLocation(il, ItemPool[i]);
ItemPool.erase(ItemPool.begin() + i);
return;
}
}
SPDLOG_ERROR("ERROR: No Junk to Place!!!");
}
static void PlaceVanillaMapsAndCompasses() {
auto ctx = Rando::Context::GetInstance();
for (auto dungeon : ctx->GetDungeons()->GetDungeonList()) {

View File

@@ -9,7 +9,6 @@ class ItemLocation;
void AddItemToPool(std::vector<RandomizerGet>& pool, const RandomizerGet item, size_t count = 1);
RandomizerGet GetJunkItem();
void PlaceJunkInExcludedLocation(const RandomizerCheck il);
void GenerateItemPool();
extern std::vector<RandomizerGet> ItemPool;