OpenTTD
|
Action of transferring cargo from a vehicle to a station. More...
#include <cargoaction.h>
Public Member Functions | |
CargoTransfer (VehicleCargoList *source, StationCargoList *destination, uint max_move) | |
bool | operator() (CargoPacket *cp) |
Transfers some cargo from a vehicle to a station. | |
![]() | |
CargoMovement (VehicleCargoList *source, StationCargoList *destination, uint max_move) | |
uint | MaxMove () |
Returns how much more cargo can be moved with this action. |
Additional Inherited Members | |
![]() | |
CargoPacket * | Preprocess (CargoPacket *cp) |
![]() | |
VehicleCargoList * | 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 transferring cargo from a vehicle to a station.
Definition at line 73 of file cargoaction.h.
bool CargoTransfer::operator() | ( | CargoPacket * | cp | ) |
Transfers some cargo from a vehicle to a station.
cp | Packet to be transfered. |
Definition at line 168 of file cargoaction.cpp.
References StationCargoList::Append(), CargoPacket::Count(), CargoMovement< VehicleCargoList, StationCargoList >::destination, CargoList< VehicleCargoList, CargoPacketList >::MTA_TRANSFER, CargoPacket::NextStation(), CargoMovement< VehicleCargoList, StationCargoList >::Preprocess(), VehicleCargoList::RemoveFromMeta(), and CargoMovement< VehicleCargoList, StationCargoList >::source.