OpenTTD Source 20241224-master-gf74b0cf984
ReturnCargoAction Struct Reference

Action for returning reserved cargo. More...

Public Member Functions

 ReturnCargoAction (Station *st, StationID next_one)
 Construct a cargo return action.
 
bool operator() (Vehicle *v)
 Return all reserved cargo from a vehicle.
 

Data Fields

Stationst
 Station to give the returned cargo to.
 
StationID next_hop
 Next hop the cargo should be assigned to.
 

Detailed Description

Action for returning reserved cargo.

Definition at line 1428 of file economy.cpp.

Constructor & Destructor Documentation

◆ ReturnCargoAction()

ReturnCargoAction::ReturnCargoAction ( Station st,
StationID  next_one 
)
inline

Construct a cargo return action.

Parameters
stStation to give the returned cargo to.
next_oneNext hop the cargo should be assigned to.

Definition at line 1438 of file economy.cpp.

Member Function Documentation

◆ operator()()

bool ReturnCargoAction::operator() ( Vehicle v)
inline

Return all reserved cargo from a vehicle.

Parameters
vVehicle to return cargo from.
Returns
true.

Definition at line 1445 of file economy.cpp.

References GoodsEntry::cargo, Vehicle::cargo, Vehicle::cargo_type, Station::goods, and VehicleCargoList::Return().

Field Documentation

◆ next_hop

StationID ReturnCargoAction::next_hop

Next hop the cargo should be assigned to.

Definition at line 1431 of file economy.cpp.

◆ st

Station* ReturnCargoAction::st

Station to give the returned cargo to.

Definition at line 1430 of file economy.cpp.


The documentation for this struct was generated from the following file: