Changeset - r12981:5019b5a04316
[Not reviewed]
master
0 2 0
rubidium - 15 years ago 2009-09-09 08:22:21
rubidium@openttd.org
(svn r17485) -Change [FS2459]: make the performance ratings harder to exploit; only count profitable vehicles and recently serviced stations.
2 files changed with 6 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -163,13 +163,13 @@ int UpdateCompanyRatingAndValue(Company 
 
		bool min_profit_first = true;
 
		uint num = 0;
 

	
 
		FOR_ALL_VEHICLES(v) {
 
			if (v->owner != owner) continue;
 
			if (IsCompanyBuildableVehicleType(v->type) && v->IsPrimaryVehicle()) {
 
				num++;
 
				if (v->profit_last_year > 0) num++; // For the vehicle score only count profitable vehicles
 
				if (v->age > 730) {
 
					/* Find the vehicle with the lowest amount of profit */
 
					if (min_profit_first || min_profit > v->profit_last_year) {
 
						min_profit = v->profit_last_year;
 
						min_profit_first = false;
 
					}
 
@@ -188,13 +188,14 @@ int UpdateCompanyRatingAndValue(Company 
 
	/* Count stations */
 
	{
 
		uint num = 0;
 
		const Station *st;
 

	
 
		FOR_ALL_STATIONS(st) {
 
			if (st->owner == owner) num += CountBits((byte)st->facilities);
 
			/* Only count stations that are actually serviced */
 
			if (st->owner == owner && (st->time_since_load <= 20 || st->time_since_unload <= 20)) num += CountBits((byte)st->facilities);
 
		}
 
		_score_part[owner][SCORE_STATIONS] = num;
 
	}
 

	
 
	/* Generate statistics depending on recent income statistics */
 
	{
src/lang/english.txt
Show inline comments
 
@@ -552,15 +552,15 @@ STR_PERFORMANCE_DETAIL_MAX_INCOME       
 
STR_PERFORMANCE_DETAIL_DELIVERED                                :{BLACK}Delivered:
 
STR_PERFORMANCE_DETAIL_CARGO                                    :{BLACK}Cargo:
 
STR_PERFORMANCE_DETAIL_MONEY                                    :{BLACK}Money:
 
STR_PERFORMANCE_DETAIL_LOAN                                     :{BLACK}Loan:
 
STR_PERFORMANCE_DETAIL_TOTAL                                    :{BLACK}Total:
 
############ End of order list
 
STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP                         :{BLACK}Number of vehicles; this includes road vehicles, trains, ships and aircraft
 
STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP                         :{BLACK}Number of station parts. Every part of a station (e.g. train station, bus stop, airport) is counted, even if they are connected as one station
 
STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP                       :{BLACK}The profit of the vehicle with the lowest income (of all vehicles older than 2 years)
 
STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP                         :{BLACK}Number of vehicles that turned a profit last year; this includes road vehicles, trains, ships and aircraft
 
STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP                         :{BLACK}Number of recently-serviced station parts. Every part of a station (e.g. train station, bus stop, airport) is counted, even if they are connected as one station
 
STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP                       :{BLACK}The profit of the vehicle with the lowest income (only vehicles older than two years are considered)
 
STR_PERFORMANCE_DETAIL_MIN_INCOME_TOOLTIP                       :{BLACK}Amount of cash made in the month with the lowest profit of the last 12 quarters
 
STR_PERFORMANCE_DETAIL_MAX_INCOME_TOOLTIP                       :{BLACK}Amount of cash made in the month with the highest profit of the last 12 quarters
 
STR_PERFORMANCE_DETAIL_DELIVERED_TOOLTIP                        :{BLACK}Units of cargo delivered in the last four quarters
 
STR_PERFORMANCE_DETAIL_CARGO_TOOLTIP                            :{BLACK}Number of types of cargo delivered in the last quarter
 
STR_PERFORMANCE_DETAIL_MONEY_TOOLTIP                            :{BLACK}Amount of money this company has in the bank
 
STR_PERFORMANCE_DETAIL_LOAN_TOOLTIP                             :{BLACK}The amount of money this company has taken on loan
0 comments (0 inline, 0 general)