Changeset - r26188:737e1cbfe45a
[Not reviewed]
master
0 1 0
Tyler Trahan - 2 years ago 2022-03-10 21:34:03
tyler@tylertrahan.com
Change: Don't pay Property Maintenance on stations when Infrastructure Maintenance is disabled (#9828)
1 file changed with 2 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -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);
0 comments (0 inline, 0 general)