diff options
author | frosch <frosch@openttd.org> | 2011-10-03 17:26:37 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-10-03 17:26:37 +0000 |
commit | d071eefc54849a4dade4d71c8c8f7b0ca568deab (patch) | |
tree | a101fc4f2e9fa1ee7f52e635c3b1a03b8a5f1bc4 /src/group.h | |
parent | 23a2f23eb35cec39f7a31fe6b541c95a11e0102f (diff) | |
download | openttd-d071eefc54849a4dade4d71c8c8f7b0ca568deab.tar.xz |
(svn r22985) -Feature: Display autoreplace status in group GUI.
Diffstat (limited to 'src/group.h')
-rw-r--r-- | src/group.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/group.h b/src/group.h index cfc1dd578..7672f3862 100644 --- a/src/group.h +++ b/src/group.h @@ -26,6 +26,9 @@ struct GroupStatistics { uint16 num_vehicle; ///< Number of vehicles. uint16 *num_engines; ///< Caches the number of engines of each type the company owns. + bool autoreplace_defined; ///< Are any autoreplace rules set? + bool autoreplace_finished; ///< Have all autoreplacement finished? + uint16 num_profit_vehicle; ///< Number of vehicles considered for profit statistics; Money profit_last_year; ///< Sum of profits for all vehicles. @@ -40,6 +43,12 @@ struct GroupStatistics { this->profit_last_year = 0; } + void ClearAutoreplace() + { + this->autoreplace_defined = false; + this->autoreplace_finished = false; + } + static GroupStatistics &Get(CompanyID company, GroupID id_g, VehicleType type); static GroupStatistics &Get(const Vehicle *v); static GroupStatistics &GetAllGroup(const Vehicle *v); @@ -50,6 +59,7 @@ struct GroupStatistics { static void UpdateProfits(); static void UpdateAfterLoad(); + static void UpdateAutoreplace(CompanyID company); }; /** Group data. */ |