mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Fix more missing location pool exclusions (#5108)
* Fix more location pool exclusion misses * Add assert to ensure item pool isn't too large. This will catch any issues where too many items are getting added to the pool in Debug mode. It only checks to make sure the item pool is smaller than the location pool, as the code actually handles that just fine by placing Junk if the pool runs out. The Item Pool being larger than the location pool though could easily result in items not being placed. Logic should prevent a seed like that actually being generated, but No Logic does no such checks. * Add TODO comment for Item Pool, should be same size as Location Pool. * Prevent Completed Triforce from ending up in Location List
This commit is contained in:
parent
9b9a0061ab
commit
c54883da72
2 changed files with 9 additions and 13 deletions
|
@ -1363,6 +1363,11 @@ void GenerateItemPool() {
|
|||
}
|
||||
}
|
||||
PendingJunkPool.clear();
|
||||
|
||||
// RANDOTODO: Ideally this should be checking for equality, but that is not currently the case and has never been
|
||||
// the case, and isn't even currently the case in the 3drando repo we inherited this from years ago, so it may
|
||||
// be a large undertaking to fix.
|
||||
assert(ItemPool.size() <= ctx->allLocations.size() || !"Item Pool larger than Location Pool");
|
||||
}
|
||||
|
||||
void AddJunk() {
|
||||
|
|
|
@ -157,17 +157,17 @@ bool Context::IsQuestOfLocationActive(RandomizerCheck rc) {
|
|||
|
||||
void Context::GenerateLocationPool() {
|
||||
allLocations.clear();
|
||||
if (mOptions[RSK_TRIFORCE_HUNT]) {
|
||||
AddLocation(RC_TRIFORCE_COMPLETED);
|
||||
}
|
||||
for (Location& location : StaticData::GetLocationTable()) {
|
||||
// skip RCs that shouldn't be in the pool for any reason (i.e. settings, unsupported check type, etc.)
|
||||
// TODO: Exclude checks for some of the older shuffles from the pool too i.e. Frog Songs, Scrubs, etc.)
|
||||
if (location.GetRandomizerCheck() == RC_UNKNOWN_CHECK ||
|
||||
location.GetRandomizerCheck() == RC_TRIFORCE_COMPLETED || // already in pool
|
||||
(location.GetRandomizerCheck() == RC_MASTER_SWORD_PEDESTAL && mOptions[RSK_SHUFFLE_MASTER_SWORD].Is(RO_GENERIC_OFF)) ||
|
||||
(location.GetRandomizerCheck() == RC_KAK_100_GOLD_SKULLTULA_REWARD && mOptions[RSK_SHUFFLE_100_GS_REWARD].Is(RO_GENERIC_OFF)) ||
|
||||
location.GetRCType() == RCTYPE_CHEST_GAME || // not supported yet
|
||||
location.GetRCType() == RCTYPE_STATIC_HINT || // can't have items
|
||||
location.GetRCType() == RCTYPE_GOSSIP_STONE || // can't have items
|
||||
(location.GetRCType() == RCTYPE_FROG_SONG && mOptions[RSK_SHUFFLE_FROG_SONG_RUPEES].Is(RO_GENERIC_OFF)) ||
|
||||
(location.GetRCType() == RCTYPE_SCRUB && mOptions[RSK_SHUFFLE_SCRUBS].Is(RO_SCRUBS_OFF)) ||
|
||||
(location.GetRCType() == RCTYPE_SCRUB && mOptions[RSK_SHUFFLE_SCRUBS].Is(RO_SCRUBS_ONE_TIME_ONLY) && !(
|
||||
location.GetRandomizerCheck() == RC_LW_DEKU_SCRUB_GROTTO_FRONT ||
|
||||
|
@ -177,16 +177,7 @@ void Context::GenerateLocationPool() {
|
|||
(location.GetRCType() == RCTYPE_ADULT_TRADE && mOptions[RSK_SHUFFLE_ADULT_TRADE].Is(RO_GENERIC_OFF)) ||
|
||||
(location.GetRCType() == RCTYPE_COW && mOptions[RSK_SHUFFLE_COWS].Is(RO_GENERIC_OFF)) ||
|
||||
(location.GetRandomizerCheck() == RC_LH_HYRULE_LOACH && mOptions[RSK_FISHSANITY].IsNot(RO_FISHSANITY_HYRULE_LOACH)) ||
|
||||
(location.GetRCType() == RCTYPE_FISH && (
|
||||
mOptions[RSK_FISHSANITY].Is(RO_FISHSANITY_OFF) || mOptions[RSK_FISHSANITY].Is(RO_FISHSANITY_HYRULE_LOACH) ||
|
||||
(mOptions[RSK_FISHSANITY].Is(RO_FISHSANITY_OVERWORLD) && location.GetScene() == SCENE_FISHING_POND) ||
|
||||
(mOptions[RSK_FISHSANITY].Is(RO_FISHSANITY_POND) && location.GetScene() != SCENE_FISHING_POND) ||
|
||||
((mOptions[RSK_FISHSANITY].Is(RO_FISHSANITY_POND) || mOptions[RSK_FISHSANITY].Is(RO_FISHSANITY_BOTH)) &&
|
||||
(mOptions[RSK_FISHSANITY_AGE_SPLIT].Is(RO_GENERIC_OFF) && (
|
||||
location.GetRandomizerCheck() >= RC_LH_ADULT_FISH_1 && location.GetRandomizerCheck() <= RC_LH_ADULT_LOACH)
|
||||
)
|
||||
)
|
||||
)) ||
|
||||
(location.GetRCType() == RCTYPE_FISH && !mFishsanity->GetFishLocationIncluded(&location)) ||
|
||||
(location.GetRCType() == RCTYPE_POT && mOptions[RSK_SHUFFLE_POTS].Is(RO_SHUFFLE_POTS_OFF)) ||
|
||||
(location.GetRCType() == RCTYPE_FAIRY && !mOptions[RSK_SHUFFLE_FAIRIES]) ||
|
||||
(location.GetRCType() == RCTYPE_FREESTANDING &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue