summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxxAtrain223 <xxAtrain223@users.noreply.github.com>2025-12-15 13:49:11 -0600
committerGitHub <noreply@github.com>2025-12-15 12:49:11 -0700
commit352a4e92604744c72143d747bb84171f547131f5 (patch)
tree06940f5aeb5261d1522f498c4fe75773b2ff14ec
parent05d865337c1c78efa724bafd30d031c6383eae06 (diff)
Added small key doors special case for Thieves Hideout. (#6023)
-rw-r--r--soh/soh/Enhancements/randomizer/logic.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/soh/soh/Enhancements/randomizer/logic.cpp b/soh/soh/Enhancements/randomizer/logic.cpp
index fd578d7de..382be7bdf 100644
--- a/soh/soh/Enhancements/randomizer/logic.cpp
+++ b/soh/soh/Enhancements/randomizer/logic.cpp
@@ -2118,6 +2118,21 @@ void Logic::SetQuestItem(uint32_t item, bool state) {
}
}
+const std::vector<uint8_t>& GetThievesHideoutSmallKeyDoors() {
+ // Retrieved from scenes/shared/gerudoway_scene/gerudoway_room_%d
+ // SOH::SceneCommandID::SetActorList, actor.id == ACTOR_DOOR_GERUDO, actor.params & 0x3F
+ static const std::vector<uint8_t> normalSmallKeyDoors{ 1, 2, 3, 4 };
+ static const std::vector<uint8_t> fastSmallKeyDoors{ 1 };
+ static const std::vector<uint8_t> freeSmallKeyDoors{};
+
+ if (RAND_GET_OPTION(RSK_GERUDO_FORTRESS) == RO_GF_CARPENTERS_NORMAL) {
+ return normalSmallKeyDoors;
+ } else if (RAND_GET_OPTION(RSK_GERUDO_FORTRESS) == RO_GF_CARPENTERS_FAST) {
+ return fastSmallKeyDoors;
+ }
+ return freeSmallKeyDoors;
+}
+
// Get the swch bit positions for the dungeon
const std::vector<uint8_t>& GetDungeonSmallKeyDoors(SceneID sceneId) {
static const std::vector<uint8_t> emptyVector;
@@ -2183,7 +2198,8 @@ const std::vector<uint8_t>& GetDungeonSmallKeyDoors(SceneID sceneId) {
}
int8_t Logic::GetUsedSmallKeyCount(SceneID sceneId) {
- const auto& smallKeyDoors = GetDungeonSmallKeyDoors(sceneId);
+ const auto& smallKeyDoors =
+ (sceneId == SCENE_THIEVES_HIDEOUT) ? GetThievesHideoutSmallKeyDoors() : GetDungeonSmallKeyDoors(sceneId);
// Get the swch value for the scene
uint32_t swch;