19template <
class Tsource>
39class CargoDelivery :
public CargoRemoval<VehicleCargoList> {
55template <
class Tsource,
class Tdest>
73class CargoTransfer :
public CargoMovement<VehicleCargoList, StationCargoList> {
83class CargoLoad :
public CargoMovement<StationCargoList, VehicleCargoList> {
93class CargoReservation :
public CargoLoad {
101class CargoReturn :
public CargoMovement<VehicleCargoList, StationCargoList> {
112class CargoShift :
public CargoMovement<VehicleCargoList, VehicleCargoList> {
120template <
class Tlist>
121class CargoReroute :
public CargoMovement<Tlist, Tlist> {
128 CargoMovement<Tlist, Tlist>(
source, dest,
max_move), avoid(avoid), avoid2(avoid2), ge(ge) {}
132class StationCargoReroute :
public CargoReroute<StationCargoList> {
135 CargoReroute<StationCargoList>(
source, dest,
max_move, avoid, avoid2, ge) {}
140class VehicleCargoReroute :
public CargoReroute<VehicleCargoList> {
143 CargoReroute<VehicleCargoList>(
source, dest,
max_move, avoid, avoid2, ge)
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.
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.
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.
uint MaxMove()
Returns how much more cargo can be removed with this action.
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.