mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-13 04:29:30 -04:00
[Bugfix] Skull house checks showing as 0 rupees in tracker (#6822)
This commit is contained in:
@@ -126,6 +126,11 @@ bool ItemLocation::HasCustomPrice() const {
|
|||||||
return hasCustomPrice;
|
return hasCustomPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ItemLocation::CanBePurchased() const {
|
||||||
|
const RandomizerCheckType checkType = StaticData::GetLocation(rc)->GetRCType();
|
||||||
|
return checkType == RCTYPE_SHOP || checkType == RCTYPE_SCRUB || checkType == RCTYPE_MERCHANT;
|
||||||
|
}
|
||||||
|
|
||||||
void ItemLocation::SetCustomPrice(const uint16_t price_) {
|
void ItemLocation::SetCustomPrice(const uint16_t price_) {
|
||||||
price = price_;
|
price = price_;
|
||||||
hasCustomPrice = true;
|
hasCustomPrice = true;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class ItemLocation {
|
|||||||
void SetPrice(uint16_t price_);
|
void SetPrice(uint16_t price_);
|
||||||
bool HasCustomPrice() const;
|
bool HasCustomPrice() const;
|
||||||
void SetCustomPrice(uint16_t price_);
|
void SetCustomPrice(uint16_t price_);
|
||||||
|
bool CanBePurchased() const;
|
||||||
bool HasObtained() const;
|
bool HasObtained() const;
|
||||||
void SetCheckStatus(RandomizerCheckStatus status_);
|
void SetCheckStatus(RandomizerCheckStatus status_);
|
||||||
RandomizerCheckStatus GetCheckStatus();
|
RandomizerCheckStatus GetCheckStatus();
|
||||||
|
|||||||
@@ -2073,7 +2073,7 @@ void DrawLocation(RandomizerCheck rc) {
|
|||||||
} else if (revealItemName) {
|
} else if (revealItemName) {
|
||||||
txt = itemLoc->GetPlacedItem().GetName().GetForLanguage(gSaveContext.language);
|
txt = itemLoc->GetPlacedItem().GetName().GetForLanguage(gSaveContext.language);
|
||||||
}
|
}
|
||||||
if (IsVisibleInCheckTracker(rc) && status == RCSHOW_IDENTIFIED) {
|
if (itemLoc->CanBePurchased() && IsVisibleInCheckTracker(rc) && status == RCSHOW_IDENTIFIED) {
|
||||||
auto price = OTRGlobals::Instance->gRandoContext->GetItemLocation(rc)->GetPrice();
|
auto price = OTRGlobals::Instance->gRandoContext->GetItemLocation(rc)->GetPrice();
|
||||||
txt = !txt.empty() ? fmt::format("{} - {}", txt, price) : fmt::format("{}", price);
|
txt = !txt.empty() ? fmt::format("{} - {}", txt, price) : fmt::format("{}", price);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user