summaryrefslogtreecommitdiff
path: root/src/group.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2014-04-08 21:09:06 +0000
committerpeter1138 <peter1138@openttd.org>2014-04-08 21:09:06 +0000
commit567d0ff3a7286fe830bf188c2911e3d10d70eb8c (patch)
treef61a570d4fb3a9bb1419b0eee818692686d75462 /src/group.h
parent3e9c10f9e11935a82d33fd5c66592d795c279777 (diff)
downloadopenttd-567d0ff3a7286fe830bf188c2911e3d10d70eb8c.tar.xz
(svn r26450) -Feature: Hierarchical vehicle subgroups.
Diffstat (limited to 'src/group.h')
-rw-r--r--src/group.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/group.h b/src/group.h
index d8680c294..91ee77e60 100644
--- a/src/group.h
+++ b/src/group.h
@@ -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;