Merge branch 'lifetime_profit-sx' into jgrpp

Conflicts:
	src/saveload/afterload.cpp
	src/saveload/extended_ver_sl.cpp
	src/saveload/extended_ver_sl.h
	src/vehicle_gui.cpp
This commit is contained in:
Jonathan G Rennison
2016-01-01 15:04:54 +00:00
8 changed files with 48 additions and 11 deletions

View File

@@ -190,6 +190,7 @@ public:
Money profit_this_year; ///< Profit this year << 8, low 8 bits are fract
Money profit_last_year; ///< Profit last year << 8, low 8 bits are fract
Money profit_lifetime; ///< Profit lifetime << 8, low 8 bits are fract
Money value; ///< Value of the vehicle
Money repair_cost; ///< Cost to repair one breakdown
@@ -536,6 +537,12 @@ public:
*/
Money GetDisplayProfitLastYear() const { return (this->profit_last_year >> 8); }
/**
* Gets the lifetime profit of vehicle. It can be sent into SetDParam for string processing.
* @return the vehicle's lifetime profit
*/
Money GetDisplayProfitLifetime() const { return ((this->profit_lifetime + this->profit_this_year) >> 8); }
void SetNext(Vehicle *next);
/**