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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user