Change: Don't pay Property Maintenance on stations when Infrastructure Maintenance is disabled (#9828)

pull/379/head
Tyler Trahan 2 years ago committed by GitHub
parent fbbc80f79e
commit d220debc6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -648,13 +648,8 @@ static void CompaniesGenStatistics()
Backup<CompanyID> 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);

Loading…
Cancel
Save