OpenTTD
|
Action of reserving cargo from a station to be loaded onto a vehicle. More...
#include <cargoaction.h>
Public Member Functions | |
CargoReservation (StationCargoList *source, VehicleCargoList *destination, uint max_move, TileIndex load_place) | |
bool | operator() (CargoPacket *cp) |
Reserves some cargo for loading. More... | |
![]() | |
CargoLoad (StationCargoList *source, VehicleCargoList *destination, uint max_move, TileIndex load_place) | |
bool | operator() (CargoPacket *cp) |
Loads some cargo onto a vehicle. More... | |
![]() | |
CargoMovement (StationCargoList *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... | |
![]() | |
TileIndex | load_place |
TileIndex to be saved in the packets' loaded_at_xy. | |
![]() | |
StationCargoList * | 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 reserving cargo from a station to be loaded onto a vehicle.
Definition at line 91 of file cargoaction.h.
bool CargoReservation::operator() | ( | CargoPacket * | cp | ) |
Reserves some cargo for loading.
cp | Packet to be reserved. |
Definition at line 136 of file cargoaction.cpp.
References CargoPacket::Count(), CargoList< VehicleCargoList, CargoPacketList >::MTA_LOAD, CargoRemoval< Tsource >::Preprocess(), CargoPacket::SetLoadPlace(), and CargoRemoval< Tsource >::source.