OpenTTD
|
Action of shifting cargo from one vehicle to another. More...
#include <cargoaction.h>
Public Member Functions | |
CargoShift (VehicleCargoList *source, VehicleCargoList *destination, uint max_move) | |
bool | operator() (CargoPacket *cp) |
Shifts some cargo from a vehicle to another one. More... | |
![]() | |
CargoMovement (VehicleCargoList *source, VehicleCargoList *destination, uint max_move) | |
uint | MaxMove () |
Returns how much more cargo can be moved with this action. More... | |
Additional Inherited Members | |
![]() | |
CargoPacket * | Preprocess (CargoPacket *cp) |
Decides if a packet needs to be split. More... | |
![]() | |
VehicleCargoList * | source |
Source of the cargo. | |
VehicleCargoList * | destination |
Destination for the cargo. | |
uint | max_move |
Maximum amount of cargo to be moved with this action. | |
Action of shifting cargo from one vehicle to another.
Definition at line 108 of file cargoaction.h.
bool CargoShift::operator() | ( | CargoPacket * | cp | ) |
Shifts some cargo from a vehicle to another one.
cp | Packet to be shifted. |
Definition at line 183 of file cargoaction.cpp.
References CargoPacket::Count(), CargoList< VehicleCargoList, CargoPacketList >::MTA_KEEP, CargoRemoval< Tsource >::Preprocess(), and CargoRemoval< Tsource >::source.