OpenTTD Source 20241224-master-gee860a5c8e
|
Action of loading cargo from a station onto a vehicle. More...
#include <cargoaction.h>
Public Member Functions | |
CargoLoad (StationCargoList *source, VehicleCargoList *destination, uint max_move, TileIndex current_tile) | |
bool | operator() (CargoPacket *cp) |
Loads some cargo onto a vehicle. | |
Public Member Functions inherited from CargoMovement< StationCargoList, VehicleCargoList > | |
CargoMovement (StationCargoList *source, VehicleCargoList *destination, uint max_move) | |
uint | MaxMove () |
Returns how much more cargo can be moved with this action. | |
Protected Attributes | |
TileIndex | current_tile |
Current tile cargo loading is happening. | |
Protected Attributes inherited from CargoMovement< StationCargoList, VehicleCargoList > | |
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. | |
Additional Inherited Members | |
Protected Member Functions inherited from CargoMovement< StationCargoList, VehicleCargoList > | |
CargoPacket * | Preprocess (CargoPacket *cp) |
Decides if a packet needs to be split. | |
Action of loading cargo from a station onto a vehicle.
Definition at line 83 of file cargoaction.h.
|
inline |
Definition at line 87 of file cargoaction.h.
bool CargoLoad::operator() | ( | CargoPacket * | cp | ) |
Loads some cargo onto a vehicle.
cp | Packet to be loaded. |
Definition at line 119 of file cargoaction.cpp.
References VehicleCargoList::Append(), CargoPacket::Count(), current_tile, CargoMovement< StationCargoList, VehicleCargoList >::destination, CargoList< VehicleCargoList, CargoPacketList >::MTA_KEEP, CargoMovement< StationCargoList, VehicleCargoList >::Preprocess(), CargoList< Tinst, Tcont >::RemoveFromCache(), CargoMovement< StationCargoList, VehicleCargoList >::source, and CargoPacket::UpdateLoadingTile().
|
protected |
Current tile cargo loading is happening.
Definition at line 85 of file cargoaction.h.
Referenced by operator()(), and CargoReservation::operator()().