OpenTTD Source 20260421-master-gc2fbc6fdeb
StationCargoReroute Class Reference

Action of rerouting cargo in a station. More...

#include <cargoaction.h>

Inheritance diagram for StationCargoReroute:
CargoReroute< StationCargoList > CargoMovement< StationCargoList, StationCargoList >

Public Member Functions

 StationCargoReroute (StationCargoList *source, StationCargoList *dest, uint max_move, StationID avoid, StationID avoid2, const GoodsEntry *ge)
bool operator() (CargoPacket *cp)
 Reroutes some cargo from one Station sublist to another.
Public Member Functions inherited from CargoReroute< StationCargoList >
 CargoReroute (StationCargoList *source, StationCargoList *dest, uint max_move, StationID avoid, StationID avoid2, const GoodsEntry *ge)
 Create the movement.
Public Member Functions inherited from CargoMovement< StationCargoList, StationCargoList >
 CargoMovement (StationCargoList *source, StationCargoList *destination, uint max_move)
 Create the movement.
uint MaxMove ()
 Returns how much more cargo can be moved with this action.

Additional Inherited Members

Protected Member Functions inherited from CargoMovement< StationCargoList, StationCargoList >
CargoPacketPreprocess (CargoPacket *cp)
 Decides if a packet needs to be split.
Protected Attributes inherited from CargoReroute< StationCargoList >
StationID avoid
 First station to avoid during rerouting.
StationID avoid2
 Second station to avoid during rerouting, could be StationID::Invalid().
const GoodsEntryge
 Goods that are to be rerouted.
Protected Attributes inherited from CargoMovement< StationCargoList, StationCargoList >
StationCargoListsource
 Source of the cargo.
StationCargoListdestination
 Destination for the cargo.
uint max_move
 Maximum amount of cargo to be moved with this action.

Detailed Description

Action of rerouting cargo in a station.

Definition at line 160 of file cargoaction.h.

Constructor & Destructor Documentation

◆ StationCargoReroute()

StationCargoReroute::StationCargoReroute ( StationCargoList * source,
StationCargoList * dest,
uint max_move,
StationID avoid,
StationID avoid2,
const GoodsEntry * ge )
inline

Definition at line 162 of file cargoaction.h.

Member Function Documentation

◆ operator()()

bool StationCargoReroute::operator() ( CargoPacket * cp)

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