Add: [GS] Allow to set max loan for each company separately (#11224)

This commit is contained in:
dP
2024-01-30 23:45:19 +05:30
committed by GitHub
parent b370ae1212
commit 897b59c158
15 changed files with 129 additions and 20 deletions

View File

@@ -572,7 +572,7 @@ static void CompanyCheckBankrupt(Company *c)
if (_settings_game.difficulty.infinite_money) return;
/* If the company has money again, it does not go bankrupt */
if (c->money - c->current_loan >= -_economy.max_loan) {
if (c->money - c->current_loan >= -c->GetMaxLoan()) {
int previous_months_of_bankruptcy = CeilDiv(c->months_of_bankruptcy, 3);
c->months_of_bankruptcy = 0;
c->bankrupt_asked = 0;