OpenTTD Source: ReplaceChainItem Struct Reference

OpenTTD Source 14.1

Public Member Functions | Data Fields
ReplaceChainItem Struct Reference

Struct for recording vehicle chain replacement information. More...

## Public Member Functions
| ReplaceChainItem (Vehicle *old_veh, Vehicle *new_veh, Money cost)
| Cost of buying and refitting replacement.
Vehicle * | GetVehicle () const
| Get vehicle to use for this position. More...

## Data Fields
Vehicle * | old_veh
| Old vehicle to replace.
Vehicle * | new_veh
| Replacement vehicle, or nullptr if no replacement.
Money | cost

## Detailed Description

Struct for recording vehicle chain replacement information.

Definition at line 496 of file autoreplace_cmd.cpp.

## Member Function Documentation

## ◆ GetVehicle()

Vehicle* ReplaceChainItem::GetVehicle | ( |  | ) | const
| inline

Get vehicle to use for this position.

Returns
  Either the new vehicle, or the old vehicle if there is no replacement.

Definition at line 507 of file autoreplace_cmd.cpp.

References new_veh, and old_veh.

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

- src/autoreplace_cmd.cpp