19template <
class Tsource>
68template <
class Tsource,
class Tdest>
92class CargoTransfer :
public CargoMovement<VehicleCargoList, StationCargoList> {
112class CargoReservation :
public CargoLoad {
120class CargoReturn :
public CargoMovement<VehicleCargoList, StationCargoList> {
131class CargoShift :
public CargoMovement<VehicleCargoList, VehicleCargoList> {
139template <
class Tlist>
uint8_t CargoType
Cargo slots to indicate a cargo type within a game.
Base class for cargo packets.
CargoPayment * payment
Payment object where payments will be registered.
CargoType cargo
The cargo type of the cargo.
TileIndex current_tile
Current tile cargo delivery is happening.
bool operator()(CargoPacket *cp)
Delivers some cargo.
CargoDelivery(VehicleCargoList *source, uint max_move, CargoType cargo, CargoPayment *payment, TileIndex current_tile)
Create the delivery.
bool operator()(CargoPacket *cp)
Loads some cargo onto a vehicle.
TileIndex current_tile
Current tile cargo loading is happening.
uint MaxMove()
Returns how much more cargo can be moved with this action.
Tsource * source
Source of the cargo.
CargoPacket * Preprocess(CargoPacket *cp)
Decides if a packet needs to be split.
CargoMovement(Tsource *source, Tdest *destination, uint max_move)
Create the movement.
Tdest * destination
Destination for the cargo.
uint max_move
Maximum amount of cargo to be moved with this action.
uint Preprocess(CargoPacket *cp)
Determines the amount of cargo to be removed from a packet and removes that from the metadata of the ...
bool Postprocess(CargoPacket *cp, uint remove)
Finalize cargo removal.
Tsource * source
Source of the cargo.
uint max_move
Maximum amount of cargo to be removed with this action.
CargoRemoval(Tsource *source, uint max_move)
Create the removal.
uint MaxMove()
Returns how much more cargo can be removed with this action.
CargoReroute(Tlist *source, Tlist *dest, uint max_move, StationID avoid, StationID avoid2, const GoodsEntry *ge)
Create the movement.
const GoodsEntry * ge
Goods that are to be rerouted.
StationID avoid2
Second station to avoid during rerouting, could be StationID::Invalid().
StationID avoid
First station to avoid during rerouting.
bool operator()(CargoPacket *cp)
Reserves some cargo for loading.
TileIndex current_tile
Current tile cargo unloading is happening.
bool operator()(CargoPacket *cp)
Returns some reserved cargo.
bool operator()(CargoPacket *cp)
Shifts some cargo from a vehicle to another one.
bool operator()(CargoPacket *cp)
Transfers some cargo from a vehicle to a station.
TileIndex current_tile
Current tile cargo unloading is happening.
CargoList that is used for stations.
bool operator()(CargoPacket *cp)
Reroutes some cargo from one Station sublist to another.
CargoList that is used for vehicles.
bool operator()(CargoPacket *cp)
Reroutes some cargo in a VehicleCargoList.
Container for cargo from the same location and time.
Helper class to perform the cargo payment.
Stores station stats for a single cargo.
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > > TileIndex
The index/ID of a Tile.