OpenTTD Source
20241108-master-g80f628063a
|
Abstract action for moving cargo from one list to another. More...
#include <cargoaction.h>
Public Member Functions | |
CargoMovement (Tsource *source, Tdest *destination, uint max_move) | |
uint | MaxMove () |
Returns how much more cargo can be moved with this action. More... | |
Protected Member Functions | |
CargoPacket * | Preprocess (CargoPacket *cp) |
Decides if a packet needs to be split. More... | |
Protected Attributes | |
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. | |
Abstract action for moving cargo from one list to another.
Tsource | CargoList subclass to remove cargo from. |
Tdest | CargoList subclass to add cargo to. |
Definition at line 56 of file cargoaction.h.
|
inline |
Returns how much more cargo can be moved with this action.
Definition at line 69 of file cargoaction.h.
References CargoMovement< Tsource, Tdest >::max_move.
|
protected |
Decides if a packet needs to be split.
cp | Packet to be either split or moved in one piece. |
Definition at line 24 of file cargoaction.cpp.
Referenced by StationCargoReroute::operator()().