mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-21 05:35:45 +01:00
fix for the bulk purchase
This commit is contained in:
parent
758b0e1127
commit
1718b55c27
@ -257,7 +257,7 @@ export function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material:
|
|||||||
if (isNaN(amt) || amt < 0) {
|
if (isNaN(amt) || amt < 0) {
|
||||||
throw new Error(`Invalid input amount`);
|
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`);
|
throw new Error(`You do not have enough warehouse size to fit this purchase`);
|
||||||
}
|
}
|
||||||
const cost = amt * material.bCost;
|
const cost = amt * material.bCost;
|
||||||
|
Loading…
Reference in New Issue
Block a user