OpenTTD Source 20241224-master-gee860a5c8e
|
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. | |
Protected Member Functions | |
CargoPacket * | Preprocess (CargoPacket *cp) |
Decides if a packet needs to be split. | |
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 |
Definition at line 63 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()(), and VehicleCargoReroute::operator()().
|
protected |
Destination for the cargo.
Definition at line 59 of file cargoaction.h.
Referenced by StationCargoReroute::operator()(), and VehicleCargoReroute::operator()().
|
protected |
Maximum amount of cargo to be moved with this action.
Definition at line 60 of file cargoaction.h.
Referenced by CargoMovement< Tsource, Tdest >::MaxMove().
|
protected |
Source of the cargo.
Definition at line 58 of file cargoaction.h.
Referenced by StationCargoReroute::operator()(), and VehicleCargoReroute::operator()().