OpenTTD Source 20241224-master-gf74b0cf984
BaseConsist Struct Reference

Various front vehicle properties that are preserved when autoreplacing, using order-backup or switching front engines within a consist. More...

#include <base_consist.h>

Inheritance diagram for BaseConsist:
OrderBackup Vehicle SpecializedVehicle< Aircraft, VEH_AIRCRAFT > SpecializedVehicle< DisasterVehicle, VEH_DISASTER > SpecializedVehicle< EffectVehicle, VEH_EFFECT > SpecializedVehicle< RoadVehicle, Type > SpecializedVehicle< Ship, VEH_SHIP > SpecializedVehicle< Train, Type > SpecializedVehicle< T, Type > Aircraft DisasterVehicle EffectVehicle Ship GroundVehicle< RoadVehicle, VEH_ROAD > GroundVehicle< Train, VEH_TRAIN > GroundVehicle< T, Type > RoadVehicle Train

Public Member Functions

void CopyConsistPropertiesFrom (const BaseConsist *src)
 Copy properties of other BaseConsist.
 
void ResetDepotUnbunching ()
 Resets all the data used for depot unbunching.
 

Data Fields

std::string name
 Name of vehicle.
 
TimerGameTick::Ticks current_order_time
 How many ticks have passed since this order started.
 
TimerGameTick::Ticks lateness_counter
 How many ticks late (or early if negative) this vehicle is.
 
TimerGameTick::TickCounter timetable_start
 At what tick of TimerGameTick::counter the vehicle should start its timetable.
 
TimerGameTick::TickCounter depot_unbunching_last_departure
 When the vehicle last left its unbunching depot.
 
TimerGameTick::TickCounter depot_unbunching_next_departure
 When the vehicle will next try to leave its unbunching depot.
 
TimerGameTick::Ticks round_trip_time
 How many ticks for a single circumnavigation of the orders.
 
uint16_t service_interval
 The interval for (automatic) servicing; either in days or %.
 
VehicleOrderID cur_real_order_index
 The index to the current real (non-implicit) order.
 
VehicleOrderID cur_implicit_order_index
 The index to the current implicit order.
 
uint16_t vehicle_flags
 Used for gradual loading and other miscellaneous things (.
 

Detailed Description

Various front vehicle properties that are preserved when autoreplacing, using order-backup or switching front engines within a consist.

Definition at line 17 of file base_consist.h.

Member Function Documentation

◆ CopyConsistPropertiesFrom()

◆ ResetDepotUnbunching()

Field Documentation

◆ cur_implicit_order_index

◆ cur_real_order_index

◆ current_order_time

◆ depot_unbunching_last_departure

TimerGameTick::TickCounter BaseConsist::depot_unbunching_last_departure

When the vehicle last left its unbunching depot.

Definition at line 25 of file base_consist.h.

Referenced by Vehicle::LeaveUnbunchingDepot(), ResetDepotUnbunching(), and VehicleEnterDepot().

◆ depot_unbunching_next_departure

TimerGameTick::TickCounter BaseConsist::depot_unbunching_next_departure

When the vehicle will next try to leave its unbunching depot.

Definition at line 26 of file base_consist.h.

Referenced by Vehicle::IsWaitingForUnbunching(), Vehicle::LeaveUnbunchingDepot(), and ResetDepotUnbunching().

◆ lateness_counter

◆ name

◆ round_trip_time

TimerGameTick::Ticks BaseConsist::round_trip_time

How many ticks for a single circumnavigation of the orders.

Definition at line 27 of file base_consist.h.

Referenced by Vehicle::LeaveUnbunchingDepot(), ResetDepotUnbunching(), and VehicleEnterDepot().

◆ service_interval

uint16_t BaseConsist::service_interval

The interval for (automatic) servicing; either in days or %.

Definition at line 29 of file base_consist.h.

Referenced by CmdCloneVehicle(), and CopyConsistPropertiesFrom().

◆ timetable_start

TimerGameTick::TickCounter BaseConsist::timetable_start

At what tick of TimerGameTick::counter the vehicle should start its timetable.

Definition at line 23 of file base_consist.h.

Referenced by CmdAutofillTimetable(), CopyConsistPropertiesFrom(), TimetableWindow::DrawSummaryPanel(), and UpdateVehicleTimetable().

◆ vehicle_flags


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