Merge branch 'master' into jgrpp

# Conflicts:
#	src/economy.cpp
#	src/linkgraph/refresh.cpp
#	src/order_cmd.cpp
#	src/saveload/vehicle_sl.cpp
#	src/station.cpp
#	src/station_base.h
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_cmd.cpp
This commit is contained in:
Jonathan G Rennison
2022-03-04 18:17:44 +00:00
37 changed files with 296 additions and 245 deletions

View File

@@ -784,11 +784,19 @@ private:
}
};
struct IndustryCompare {
bool operator() (const Industry *lhs, const Industry *rhs) const;
struct IndustryListEntry {
uint distance;
Industry *industry;
bool operator==(const IndustryListEntry &other) const { return this->distance == other.distance && this->industry == other.industry; }
bool operator!=(const IndustryListEntry &other) const { return !(*this == other); }
};
typedef btree::btree_set<Industry *, IndustryCompare> IndustryList;
struct IndustryCompare {
bool operator() (const IndustryListEntry &lhs, const IndustryListEntry &rhs) const;
};
typedef btree::btree_set<IndustryListEntry, IndustryCompare> IndustryList;
/** Station data structure */
struct Station FINAL : SpecializedStation<Station, false> {
@@ -860,7 +868,8 @@ public:
}
bool CatchmentCoversTown(TownID t) const;
void AddIndustryToDeliver(Industry *ind);
void AddIndustryToDeliver(Industry *ind, TileIndex tile);
void RemoveIndustryToDeliver(Industry *ind);
void RemoveFromAllNearbyLists();
inline bool TileIsInCatchment(TileIndex tile) const