mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-25 23:55:20 -07:00
Skip CanBuy check when calculating accessible checks, it spoils that some items can't be bought with the current wallet.
This commit is contained in:
parent
4ec676f642
commit
999de5b369
3 changed files with 4 additions and 4 deletions
|
@ -398,7 +398,7 @@ bool AddCheckToLogic(LocationAccess& locPair, GetAccessibleLocationsStruct& gals
|
|||
Rando::ItemLocation* location = ctx->GetItemLocation(loc);
|
||||
RandomizerGet locItem = location->GetPlacedRandomizerGet();
|
||||
|
||||
if (!location->IsAddedToPool() && locPair.ConditionsMet(parentRegion)) {
|
||||
if (!location->IsAddedToPool() && locPair.ConditionsMet(parentRegion, gals.calculatingAccessibleChecks)) {
|
||||
location->AddToPool();
|
||||
|
||||
if (gals.calculatingAccessibleChecks) {
|
||||
|
|
|
@ -27,7 +27,7 @@ bool LocationAccess::CheckConditionAtAgeTime(bool& age, bool& time) const {
|
|||
return GetConditionsMet();
|
||||
}
|
||||
|
||||
bool LocationAccess::ConditionsMet(Region* parentRegion) const {
|
||||
bool LocationAccess::ConditionsMet(Region* parentRegion, bool calculatingAccessibleChecks) const {
|
||||
//WARNING enterance validation can run this after resetting the access for sphere 0 validation
|
||||
//When refactoring ToD access, either fix the above or do not assume that we
|
||||
//have any access at all just because this is being run
|
||||
|
@ -42,7 +42,7 @@ bool LocationAccess::ConditionsMet(Region* parentRegion) const {
|
|||
conditionsMet = true;
|
||||
}
|
||||
|
||||
return conditionsMet && CanBuy();
|
||||
return conditionsMet && (calculatingAccessibleChecks || CanBuy());
|
||||
}
|
||||
|
||||
bool LocationAccess::CanBuy() const {
|
||||
|
|
|
@ -75,7 +75,7 @@ class LocationAccess {
|
|||
|
||||
bool CheckConditionAtAgeTime(bool& age, bool& time) const;
|
||||
|
||||
bool ConditionsMet(Region* parentRegion) const;
|
||||
bool ConditionsMet(Region* parentRegion, bool calculatingAccessibleChecks) const;
|
||||
|
||||
RandomizerCheck GetLocation() const {
|
||||
return location;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue