OpenTTD Source 20250312-master-gcdcc6b491d
|
Action of rerouting cargo in a station. More...
#include <cargoaction.h>
Public Member Functions | |
StationCargoReroute (StationCargoList *source, StationCargoList *dest, uint max_move, StationID avoid, StationID avoid2, const GoodsEntry *ge) | |
bool | operator() (CargoPacket *cp) |
Reroutes some cargo from one Station sublist to another. | |
![]() | |
CargoReroute (StationCargoList *source, StationCargoList *dest, uint max_move, StationID avoid, StationID avoid2, const GoodsEntry *ge) | |
![]() | |
CargoMovement (Tsource *source, Tdest *destination, uint max_move) | |
uint | MaxMove () |
Returns how much more cargo can be moved with this action. | |
Additional Inherited Members | |
![]() | |
CargoPacket * | Preprocess (CargoPacket *cp) |
Decides if a packet needs to be split. | |
![]() | |
StationID | avoid |
StationID | avoid2 |
const GoodsEntry * | ge |
![]() | |
Tsource * | source |
Source of the cargo. | |
Tdest * | destination |
Destination for the cargo. | |
uint | max_move |
Maximum amount of cargo to be moved with this action. | |
Action of rerouting cargo in a station.
Definition at line 132 of file cargoaction.h.
|
inline |
Definition at line 134 of file cargoaction.h.
bool StationCargoReroute::operator() | ( | CargoPacket * | cp | ) |
Reroutes some cargo from one Station sublist to another.
cp | Packet to be rerouted. |
Definition at line 197 of file cargoaction.cpp.
References CargoPacket::Count(), CargoMovement< Tsource, Tdest >::destination, CargoPacket::GetFirstStation(), GoodsEntry::GetVia(), CargoMovement< Tsource, Tdest >::Preprocess(), and CargoMovement< Tsource, Tdest >::source.