1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 09:59:10 +00:00

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

This commit is contained in:
Tyler Trahan
2022-03-10 14:34:03 -07:00
committed by GitHub
parent fbbc80f79e
commit d220debc6c

View File

@@ -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);