mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
Move entrance discovered into ProcessExits.
This commit is contained in:
parent
899870f9ab
commit
93659b5ded
2 changed files with 10 additions and 4 deletions
|
@ -209,6 +209,12 @@ void ProcessExits(Region* region, GetAccessibleLocationsStruct& gals, Randomizer
|
||||||
bool stopOnBeatable = false, bool addToPlaythrough = false) {
|
bool stopOnBeatable = false, bool addToPlaythrough = false) {
|
||||||
auto ctx = Rando::Context::GetInstance();
|
auto ctx = Rando::Context::GetInstance();
|
||||||
for (auto& exit : region->exits) {
|
for (auto& exit : region->exits) {
|
||||||
|
int16_t entranceIndex = exit.GetIndex();
|
||||||
|
if (gals.calculatingAvailableChecks && ctx->GetOption(RSK_SHUFFLE_ENTRANCES).Get() && exit.IsShuffled() &&
|
||||||
|
entranceIndex != -1 && !Entrance_GetIsEntranceDiscovered(entranceIndex)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Region* exitRegion = exit.GetConnectedRegion();
|
Region* exitRegion = exit.GetConnectedRegion();
|
||||||
// Update Time of Day Access for the exit
|
// Update Time of Day Access for the exit
|
||||||
if (UpdateToDAccess(&exit, exitRegion)) {
|
if (UpdateToDAccess(&exit, exitRegion)) {
|
||||||
|
|
|
@ -591,6 +591,10 @@ void CheckTrackerLoadGame(int32_t fileNum) {
|
||||||
Randomizer_EntranceDiscovered(entranceIndex, false);
|
Randomizer_EntranceDiscovered(entranceIndex, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RANDOTODO: This is needed because using the master sword does not discover the spawn entrance.
|
||||||
|
Entrance_SetEntranceDiscovered(ENTR_LINKS_HOUSE_CHILD_SPAWN, false);
|
||||||
|
Entrance_SetEntranceDiscovered(ENTR_HYRULE_FIELD_10, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
RecalculateAvailableChecks();
|
RecalculateAvailableChecks();
|
||||||
|
@ -2018,10 +2022,6 @@ void RecalculateAvailableChecks() {
|
||||||
const auto& itemLocation = ctx->GetItemLocation(rc);
|
const auto& itemLocation = ctx->GetItemLocation(rc);
|
||||||
const auto& region = areaTable[itemLocation->GetParentRegionKey()];
|
const auto& region = areaTable[itemLocation->GetParentRegionKey()];
|
||||||
|
|
||||||
if (ctx->GetOption(RSK_SHUFFLE_ENTRANCES).Get() && !region.IsDiscovered) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (location->GetRCType() == RCTYPE_SHOP && itemLocation->GetCheckStatus() == RCSHOW_IDENTIFIED) {
|
if (location->GetRCType() == RCTYPE_SHOP && itemLocation->GetCheckStatus() == RCSHOW_IDENTIFIED) {
|
||||||
if (CanBuyAnother(rc)) {
|
if (CanBuyAnother(rc)) {
|
||||||
itemLocation->SetAvailable(true);
|
itemLocation->SetAvailable(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue