From d220debc6c693b7d237261a90e9d7ca4e144fa0c Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Thu, 10 Mar 2022 14:34:03 -0700 Subject: [PATCH] Change: Don't pay Property Maintenance on stations when Infrastructure Maintenance is disabled (#9828) --- src/economy.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/economy.cpp b/src/economy.cpp index 4f10367821..df668cbce7 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -648,13 +648,8 @@ static void CompaniesGenStatistics() Backup cur_company(_current_company, FILE_LINE); - if (!_settings_game.economy.infrastructure_maintenance) { - for (const Station *st : Station::Iterate()) { - cur_company.Change(st->owner); - CommandCost cost(EXPENSES_PROPERTY, _price[PR_STATION_VALUE] >> 1); - SubtractMoneyFromCompany(cost); - } - } else { + /* Pay Infrastructure Maintenance, if enabled */ + if (_settings_game.economy.infrastructure_maintenance) { /* Improved monthly infrastructure costs. */ for (const Company *c : Company::Iterate()) { cur_company.Change(c->index);