diff --git a/src/group.h b/src/group.h --- a/src/group.h +++ b/src/group.h @@ -71,6 +71,8 @@ struct Group : GroupPool::PoolItem<&_gro 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 g 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;