summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPepper0ni <93387759+Pepper0ni@users.noreply.github.com>2025-11-09 15:58:18 +0000
committerGitHub <noreply@github.com>2025-11-09 08:58:18 -0700
commit3d525d7eb1aef655be745724f3c1bedf518456bb (patch)
tree6a5db91f53d8a25296cd312e0df2f0f079ae18dc
parent0e162cbb7c21f142d3a5cb97d8aa48281171f5bc (diff)
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
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/fill.cpp2
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/item_pool.cpp13
-rw-r--r--soh/soh/Enhancements/randomizer/3drando/item_pool.hpp1
3 files changed, 1 insertions, 15 deletions
diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp
index 3204ace65..99deb9b70 100644
--- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp
@@ -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());
}
}
diff --git a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
index e8cab933f..ea6123b24 100644
--- a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
@@ -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()) {
diff --git a/soh/soh/Enhancements/randomizer/3drando/item_pool.hpp b/soh/soh/Enhancements/randomizer/3drando/item_pool.hpp
index 095b417b4..a437099c8 100644
--- a/soh/soh/Enhancements/randomizer/3drando/item_pool.hpp
+++ b/soh/soh/Enhancements/randomizer/3drando/item_pool.hpp
@@ -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;