(svn r26450) -Feature: Hierarchical vehicle subgroups.

This commit is contained in:
peter1138
2014-04-08 21:09:06 +00:00
parent 3e9c10f9e1
commit 567d0ff3a7
11 changed files with 218 additions and 51 deletions

View File

@@ -71,6 +71,8 @@ struct Group : GroupPool::PoolItem<&_group_pool> {
bool replace_protection; ///< If set to true, the global autoreplace have no effect on the group
GroupStatistics statistics; ///< NOSAVE: Statistics and caches on the vehicles in the group.
GroupID parent; ///< Parent group
Group(CompanyID owner = INVALID_COMPANY);
~Group();
};
@@ -101,6 +103,7 @@ void SetTrainGroupID(Train *v, GroupID grp);
void UpdateTrainGroupID(Train *v);
void RemoveVehicleFromGroup(const Vehicle *v);
void RemoveAllGroupsForCompany(const CompanyID company);
bool GroupIsInGroup(GroupID search, GroupID group);
extern GroupID _new_group_id;