Changeset - r24042:cb2ac31a63c2
[Not reviewed]
master
0 1 0
Samu - 5 years ago 2020-01-09 13:42:35
dj_samu@hotmail.com
Codechange: Use const instead of magic number for vehicle profit threshold
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/group_gui.cpp
Show inline comments
 
@@ -296,13 +296,13 @@ private:
 
		uint num_profit_vehicle = GetGroupNumProfitVehicle(this->vli.company, g_id, this->vli.vtype);
 
		Money profit_last_year = GetGroupProfitLastYear(this->vli.company, g_id, this->vli.vtype);
 
		if (num_profit_vehicle == 0) {
 
			spr = SPR_PROFIT_NA;
 
		} else if (profit_last_year < 0) {
 
			spr = SPR_PROFIT_NEGATIVE;
 
		} else if (profit_last_year < (Money)10000 * num_profit_vehicle) { // TODO magic number
 
		} else if (profit_last_year < VEHICLE_PROFIT_THRESHOLD * num_profit_vehicle) {
 
			spr = SPR_PROFIT_SOME;
 
		} else {
 
			spr = SPR_PROFIT_LOT;
 
		}
 
		DrawSprite(spr, PAL_NONE, x, y + (this->tiny_step_height - this->column_size[VGC_PROFIT].height) / 2);
 

	
0 comments (0 inline, 0 general)