forked from mirror/OpenTTD
(svn r22984) -Feature: Display profit icons for groups in the group GUI.
This commit is contained in:
11
src/group.h
11
src/group.h
@@ -26,18 +26,29 @@ struct GroupStatistics {
|
||||
uint16 num_vehicle; ///< Number of vehicles.
|
||||
uint16 *num_engines; ///< Caches the number of engines of each type the company owns.
|
||||
|
||||
uint16 num_profit_vehicle; ///< Number of vehicles considered for profit statistics;
|
||||
Money profit_last_year; ///< Sum of profits for all vehicles.
|
||||
|
||||
GroupStatistics();
|
||||
~GroupStatistics();
|
||||
|
||||
void Clear();
|
||||
|
||||
void ClearProfits()
|
||||
{
|
||||
this->num_profit_vehicle = 0;
|
||||
this->profit_last_year = 0;
|
||||
}
|
||||
|
||||
static GroupStatistics &Get(CompanyID company, GroupID id_g, VehicleType type);
|
||||
static GroupStatistics &Get(const Vehicle *v);
|
||||
static GroupStatistics &GetAllGroup(const Vehicle *v);
|
||||
|
||||
static void CountVehicle(const Vehicle *v, int delta);
|
||||
static void CountEngine(const Vehicle *v, int delta);
|
||||
static void VehicleReachedProfitAge(const Vehicle *v);
|
||||
|
||||
static void UpdateProfits();
|
||||
static void UpdateAfterLoad();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user