OpenTTD Source: ReturnCargoAction Struct Reference

OpenTTD Source 12.2

Public Member Functions | Data Fields
ReturnCargoAction Struct Reference

Action for returning reserved cargo. More...

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

## Data Fields
Station * | st
| 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 1399 of file economy.cpp.

## Constructor & Destructor Documentation

## ◆ ReturnCargoAction()

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

Construct a cargo return action.

Parameters

  st | Station to give the returned cargo to.
  next_one | Next hop the cargo should be assigned to.

Definition at line 1409 of file economy.cpp.

## Member Function Documentation

## ◆ operator()()

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

Return all reserved cargo from a vehicle.

Parameters

  v | Vehicle to return cargo from.

Returns
  true.

Definition at line 1416 of file economy.cpp.

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

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

- src/economy.cpp