summaryrefslogtreecommitdiff
path: root/src/group.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-10-03 17:26:37 +0000
committerfrosch <frosch@openttd.org>2011-10-03 17:26:37 +0000
commitd071eefc54849a4dade4d71c8c8f7b0ca568deab (patch)
treea101fc4f2e9fa1ee7f52e635c3b1a03b8a5f1bc4 /src/group.h
parent23a2f23eb35cec39f7a31fe6b541c95a11e0102f (diff)
downloadopenttd-d071eefc54849a4dade4d71c8c8f7b0ca568deab.tar.xz
(svn r22985) -Feature: Display autoreplace status in group GUI.
Diffstat (limited to 'src/group.h')
-rw-r--r--src/group.h10
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. */