Add average travel time to the link graph overlay tooltip

This commit is contained in:
Jonathan G Rennison
2022-11-06 21:55:14 +00:00
parent aa4501747f
commit b14e213bd9
19 changed files with 47 additions and 8 deletions

View File

@@ -313,9 +313,7 @@ void MultiCommodityFlow::Dijkstra(NodeID source_node, PathVector &paths)
/* Prioritize the fastest route for passengers, mail and express cargo,
* and the shortest route for other classes of cargo.
* In-between stops are punished with a 1 tile or 1 day penalty. */
bool express = IsCargoInClass(this->job.Cargo(), CC_PASSENGERS) ||
IsCargoInClass(this->job.Cargo(), CC_MAIL) ||
IsCargoInClass(this->job.Cargo(), CC_EXPRESS);
bool express = IsLinkGraphCargoExpress(this->job.Cargo());
auto calculate_distance = [&]() {
return DistanceMaxPlusManhattan(this->job[from].XY(), this->job[to].XY()) + 1;