OpenTTD Source 20241224-master-gee860a5c8e
CargoShift Class Reference

Action of shifting cargo from one vehicle to another. More...

#include <cargoaction.h>

Inheritance diagram for CargoShift:
CargoMovement< VehicleCargoList, VehicleCargoList >

Public Member Functions

 CargoShift (VehicleCargoList *source, VehicleCargoList *destination, uint max_move)
 
bool operator() (CargoPacket *cp)
 Shifts some cargo from a vehicle to another one.
 
- Public Member Functions inherited from CargoMovement< VehicleCargoList, VehicleCargoList >
 CargoMovement (VehicleCargoList *source, VehicleCargoList *destination, uint max_move)
 
uint MaxMove ()
 Returns how much more cargo can be moved with this action.
 

Additional Inherited Members

- Protected Member Functions inherited from CargoMovement< VehicleCargoList, VehicleCargoList >
CargoPacketPreprocess (CargoPacket *cp)
 Decides if a packet needs to be split.
 
- Protected Attributes inherited from CargoMovement< VehicleCargoList, VehicleCargoList >
VehicleCargoListsource
 Source of the cargo.
 
VehicleCargoListdestination
 Destination for the cargo.
 
uint max_move
 Maximum amount of cargo to be moved with this action.
 

Detailed Description

Action of shifting cargo from one vehicle to another.

Definition at line 112 of file cargoaction.h.

Constructor & Destructor Documentation

◆ CargoShift()

CargoShift::CargoShift ( VehicleCargoList source,
VehicleCargoList destination,
uint  max_move 
)
inline

Definition at line 114 of file cargoaction.h.

Member Function Documentation

◆ operator()()

bool CargoShift::operator() ( CargoPacket cp)

The documentation for this class was generated from the following files: