From 1335ca8e0178ae1ce8c03a7b738ee5631c27797a Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Mon, 11 Oct 2021 18:22:57 -0400 Subject: [PATCH] Impossible to buy real estate with negative money --- src/Corporation/Industry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Corporation/Industry.ts b/src/Corporation/Industry.ts index b9ebdf08c..6be0d0da6 100644 --- a/src/Corporation/Industry.ts +++ b/src/Corporation/Industry.ts @@ -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]); }