Skip to content

Commit

Permalink
Make size checks consistent between Purchase and Transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
SupSuper committed Apr 25, 2020
1 parent 430bf7c commit 3d092c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Basescape/PurchaseState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ void PurchaseState::increaseByValue(int change)
break;
case TRANSFER_ITEM:
rule = (RuleItem*)getRow().rule;
if (_iQty + rule->getSize() > _base->getAvailableStores() - _base->getUsedStores())
if (_base->storesOverfull(_iQty + rule->getSize()))
{
errorMessage = tr("STR_NOT_ENOUGH_STORE_SPACE");
}
Expand Down
2 changes: 1 addition & 1 deletion src/Basescape/TransferItemsState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ void TransferItemsState::increaseByValue(int change)
{
errorMessage = tr("STR_NOT_ENOUGH_STORE_SPACE");
}
else if (selItem->isAlien() && Options::storageLimitsEnforced * _aQty + 1 > _baseTo->getAvailableContainment() - Options::storageLimitsEnforced * _baseTo->getUsedContainment())
else if (selItem->isAlien() && Options::storageLimitsEnforced * _aQty + 1 > _baseTo->getAvailableContainment() - Options::storageLimitsEnforced * _baseTo->getUsedContainment())
{
errorMessage = tr("STR_NO_ALIEN_CONTAINMENT_FOR_TRANSFER");
}
Expand Down

0 comments on commit 3d092c2

Please sign in to comment.