|
OpenTTD Source
1.11.0-beta2
|
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. More... | |
Public Member Functions inherited from CargoReroute< StationCargoList > | |
| CargoReroute (StationCargoList *source, StationCargoList *dest, uint max_move, StationID avoid, StationID avoid2, const GoodsEntry *ge) | |
Public Member Functions inherited from CargoMovement< StationCargoList, StationCargoList > | |
| CargoMovement (StationCargoList *source, StationCargoList *destination, uint max_move) | |
| uint | MaxMove () |
| Returns how much more cargo can be moved with this action. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CargoMovement< StationCargoList, StationCargoList > | |
| CargoPacket * | Preprocess (CargoPacket *cp) |
| Decides if a packet needs to be split. More... | |
Protected Attributes inherited from CargoReroute< StationCargoList > | |
| StationID | avoid |
| StationID | avoid2 |
| const GoodsEntry * | ge |
Protected Attributes inherited from CargoMovement< StationCargoList, StationCargoList > | |
| StationCargoList * | source |
| Source of the cargo. | |
| StationCargoList * | 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 126 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 195 of file cargoaction.cpp.
References CargoList< Tinst, Tcont >::AddToCache(), CargoPacket::Count(), CargoMovement< StationCargoList, StationCargoList >::destination, GoodsEntry::GetVia(), MultiMap< Tkey, Tvalue, Tcompare >::Insert(), CargoList< Tinst, Tcont >::packets, CargoMovement< StationCargoList, StationCargoList >::Preprocess(), CargoList< Tinst, Tcont >::RemoveFromCache(), CargoMovement< StationCargoList, StationCargoList >::source, and CargoPacket::SourceStation().