Fix items being placed on hint locations (#4379)

This commit is contained in:
Pepper0ni 2024-10-03 01:27:43 +01:00 committed by GitHub
parent 84130b8046
commit 33c74a10b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 2 deletions

View File

@ -1023,7 +1023,7 @@ static void RandomizeDungeonItems() {
auto ctx = Rando::Context::GetInstance(); auto ctx = Rando::Context::GetInstance();
//Get Any Dungeon and Overworld group locations //Get Any Dungeon and Overworld group locations
std::vector<RandomizerCheck> anyDungeonLocations = FilterFromPool(ctx->allLocations, [](const auto loc){return Rando::StaticData::GetLocation(loc)->IsDungeon();}); std::vector<RandomizerCheck> anyDungeonLocations = Rando::StaticData::GetDungeonLocations();
//Rando::StaticData::GetOverworldLocations() defined in item_location.cpp //Rando::StaticData::GetOverworldLocations() defined in item_location.cpp
//Create Any Dungeon and Overworld item pools //Create Any Dungeon and Overworld item pools

View File

@ -82,7 +82,23 @@ std::vector<RandomizerCheck> Rando::StaticData::GetOverworldLocations() {
location.GetRandomizerCheck() != RC_UNKNOWN_CHECK && location.GetRandomizerCheck() != RC_UNKNOWN_CHECK &&
location.GetRandomizerCheck() != RC_TRIFORCE_COMPLETED && //not really an overworld check location.GetRandomizerCheck() != RC_TRIFORCE_COMPLETED && //not really an overworld check
location.GetRCType() != RCTYPE_FISH && //temp fix while locations are properly sorted out location.GetRCType() != RCTYPE_FISH && //temp fix while locations are properly sorted out
location.GetRCType() != RCTYPE_CHEST_GAME //this is supposed to be excluded location.GetRCType() != RCTYPE_CHEST_GAME && //this is supposed to be excluded
location.GetRCType() != RCTYPE_STATIC_HINT &&
location.GetRCType() != RCTYPE_GOSSIP_STONE //don't put items on hints
) {
overworldLocations.push_back(location.GetRandomizerCheck());
}
}
return overworldLocations;
}
std::vector<RandomizerCheck> Rando::StaticData::GetDungeonLocations() {
std::vector<RandomizerCheck> overworldLocations = {};
for (Location& location : locationTable) {
if (
location.IsDungeon() &&
location.GetRCType() != RCTYPE_STATIC_HINT &&
location.GetRCType() != RCTYPE_GOSSIP_STONE //don't put items on hints
) { ) {
overworldLocations.push_back(location.GetRandomizerCheck()); overworldLocations.push_back(location.GetRandomizerCheck());
} }

View File

@ -36,6 +36,7 @@ class StaticData {
static std::unordered_map<std::string, uint32_t> PopulateTranslationMap(std::unordered_map<uint32_t, RandomizerHintTextKey> input); static std::unordered_map<std::string, uint32_t> PopulateTranslationMap(std::unordered_map<uint32_t, RandomizerHintTextKey> input);
static std::multimap<std::tuple<s16, s16, s32>, RandomizerCheck> CheckFromActorMultimap; static std::multimap<std::tuple<s16, s16, s32>, RandomizerCheck> CheckFromActorMultimap;
static std::vector<RandomizerCheck> GetOverworldLocations(); static std::vector<RandomizerCheck> GetOverworldLocations();
static std::vector<RandomizerCheck> GetDungeonLocations();
static std::vector<RandomizerCheck> dungeonRewardLocations; static std::vector<RandomizerCheck> dungeonRewardLocations;
static std::vector<RandomizerCheck> GetShopLocations(); static std::vector<RandomizerCheck> GetShopLocations();
static std::vector<RandomizerCheck> GetScrubLocations(); static std::vector<RandomizerCheck> GetScrubLocations();