OpenTTD Source 20250509-master-gb1cdf5024f
|
A hop the refresh algorithm might evaluate. More...
#include <refresh.h>
Public Member Functions | |
Hop () | |
Default constructor should not be called but has to be visible for usage in std::set. | |
Hop (OrderID from, OrderID to, CargoType cargo) | |
Real constructor, only use this one. | |
constexpr auto | operator<=> (const Hop &) const noexcept=default |
Data Fields | |
OrderID | from |
Last order where vehicle could interact with cargo or absolute first order. | |
OrderID | to |
Next order to be processed. | |
CargoType | cargo |
Cargo the consist is probably carrying or INVALID_CARGO if unknown. | |
A hop the refresh algorithm might evaluate.
If the same hop is seen again the evaluation is stopped. This of course is a fairly simple heuristic. Sequences of refit orders can produce vehicles with all kinds of different cargoes and remembering only one can lead to early termination of the algorithm. However, as the order language is Turing complete, we are facing the halting problem here. At some point we have to draw the line.
|
inline |
CargoType LinkRefresher::Hop::cargo |
OrderID LinkRefresher::Hop::from |