Impossible to buy real estate with negative money

This commit is contained in:
Olivier Gagnon 2021-10-11 18:22:57 -04:00
parent 8e07cc999d
commit 1335ca8e01

@ -564,7 +564,7 @@ export class Industry implements IIndustry {
buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;
if (matName == "RealEstate") {
maxAmt = buyAmt;
maxAmt = corporation.funds.toNumber() / mat.bCost;
} else {
maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);
}