OpenTTD Source  20240919-master-gdf0233f4c2
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.
 
VehicleGetVehicle () const
 Get vehicle to use for this position. More...
 

Data Fields

Vehicleold_veh
 Old vehicle to replace.
 
Vehiclenew_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: