Index: src/lang/english.txt =================================================================== --- src/lang/english.txt (revision 27220) +++ src/lang/english.txt (working copy) -STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Profit this year: {LTBLUE}{CURRENCY_LONG} (last year: {CURRENCY_LONG}) +STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Profit this year: {LTBLUE}{CURRENCY_LONG} (last year: {CURRENCY_LONG}) (Lifetime: {CURRENCY_LONG}) STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS :{BLACK}Reliability: {LTBLUE}{COMMA}% {BLACK}Breakdowns since last service: {LTBLUE}{COMMA} >>> Maybe adding the lifetime profit with the last year profit? Having an uppercase "L" looks weird compared to the already present text. Index: src/lang/english_US.txt =================================================================== --- src/lang/english_US.txt (revision 27220) +++ src/lang/english_US.txt (working copy) >>> No need to bother with other languages, the translators will handle that when it is published. >>> (you are free to add it, but it won't get included in trunk.) =================================================================== --- src/saveload/vehicle_sl.cpp (revision 27220) +++ src/saveload/vehicle_sl.cpp (working copy) @@ -683,6 +683,7 @@ SLE_CONDVAR(Vehicle, profit_this_year, SLE_INT64, 65, SL_MAX_VERSION), SLE_CONDVAR(Vehicle, profit_last_year, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), SLE_CONDVAR(Vehicle, profit_last_year, SLE_INT64, 65, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, profit_lifetime, SLE_INT64, 194, SL_MAX_VERSION), SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_I32 | SLE_VAR_I64, 51, 64), >>> By adding a field here, you have to increment the savegame version >>> Also, you have to initialize the new field in the afterload function, when the upgrade from previous savegame versions to the new version is done. >>> The TAB versus spaces problem (see vehicle_base.h) applies here as well. (Make the difference between spaces and TABs visible in your editor!) Index: src/vehicle.cpp =================================================================== --- src/vehicle.cpp (revision 27220) +++ src/vehicle.cpp (working copy) @@ -2651,6 +2651,7 @@ v->profit_last_year = v->profit_this_year; v->profit_this_year = 0; + v->profit_lifetime += v->profit_last_year; SetWindowDirty(WC_VEHICLE_DETAILS, v->index); >>> If you move this line up, you can use "v->profit_this_year", which is easier to understand. Index: src/vehicle_base.h =================================================================== --- src/vehicle_base.h (revision 27220) +++ src/vehicle_base.h (working copy) @@ -180,6 +180,7 @@ 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 >>> Coding style only uses TAB at the leading whitespace, white space before the comment must be spaces to preserve indentation. /** - * Gets the profit vehicle had last year. It can be sent into SetDParam for string processing. - * @return the vehicle's profit last year - */ + * Gets the profit vehicle had last year. It can be sent into SetDParam for string processing. + * @return the vehicle's profit last year + */ Money GetDisplayProfitLastYear() const { return (this->profit_last_year >> 8); } >>> This change should not be done, there should be a TAB + space leading white space. + /** + * 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 >> 8); } + + >>> Like above leading white space of the continuation comment is wrong. >>> Add just 1 new empty line.