19template<
class Tsource>
55template<
class Tsource,
class Tdest>
uint8_t CargoID
Cargo slots to indicate a cargo type within a game.
Base class for cargo packets.
Action of final delivery of cargo.
CargoPayment * payment
Payment object where payments will be registered.
TileIndex current_tile
Current tile cargo delivery is happening.
bool operator()(CargoPacket *cp)
Delivers some cargo.
CargoID cargo
The cargo type of the cargo.
@ MTA_TRANSFER
Transfer the cargo to the station.
Action of loading cargo from a station onto a vehicle.
bool operator()(CargoPacket *cp)
Loads some cargo onto a vehicle.
TileIndex current_tile
Current tile cargo loading is happening.
Abstract action for moving cargo from one list to another.
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.
Abstract action of removing cargo from a vehicle or a station.
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.
Action of rerouting cargo between different cargo lists and/or next hops.
Action of reserving cargo from a station to be loaded onto a vehicle.
bool operator()(CargoPacket *cp)
Reserves some cargo for loading.
Action of returning previously reserved cargo from the vehicle to the station.
TileIndex current_tile
Current tile cargo unloading is happening.
bool operator()(CargoPacket *cp)
Returns some reserved cargo.
Action of shifting cargo from one vehicle to another.
bool operator()(CargoPacket *cp)
Shifts some cargo from a vehicle to another one.
Action of transferring cargo from a vehicle to a station.
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.
Action of rerouting cargo in a station.
bool operator()(CargoPacket *cp)
Reroutes some cargo from one Station sublist to another.
CargoList that is used for vehicles.
Action of rerouting cargo staged for transfer in a vehicle.
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.