Merge pull request #3392 from phyzical/bugfix/fix-bulk-purchase

fix for the bulk purchase
This commit is contained in:
hydroflame 2022-04-11 11:59:27 -04:00 committed by GitHub
commit f8807c5612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -257,7 +257,7 @@ export function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material:
if (isNaN(amt) || amt < 0) {
throw new Error(`Invalid input amount`);
}
if (amt * matSize <= maxAmount) {
if (amt > maxAmount) {
throw new Error(`You do not have enough warehouse size to fit this purchase`);
}
const cost = amt * material.bCost;