Skip to content

Commit

Permalink
ShopFilteringCriteria HAS_STOCK_LEFT and HAS_SPACE_LEFT no longer aff…
Browse files Browse the repository at this point in the history
…ect shops which do not support their respective mode
  • Loading branch information
BlvckBytes committed Nov 10, 2024
1 parent 5efb0fe commit 8b0212a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ public enum ShopFilteringCriteria implements FilteringFunction {
IS_UNLIMITED((shop, d, negative) -> shop.handle.isUnlimited() ^ negative),
HAS_STOCK_LEFT((shop, d, negative) -> {
if (!shop.handle.isSelling())
return false;
return true;

return (shop.handle.isUnlimited() || shop.cachedStock > 0) ^ negative;
}),
HAS_SPACE_LEFT((shop, d, negative) -> {
if (!shop.handle.isBuying())
return false;
return true;

return (shop.handle.isUnlimited() || shop.cachedSpace > 0) ^ negative;
}),
Expand Down

0 comments on commit 8b0212a

Please sign in to comment.