OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
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:

## Public Member Functions
void | CopyConsistPropertiesFrom (const BaseConsist *src)
| Copy properties of other BaseConsist.

## Data Fields
char * | name
| Name of vehicle.
uint32 | current_order_time
| How many ticks have passed since this order started.
int32 | lateness_counter
| How many ticks late (or early if negative) this vehicle is.
Date | timetable_start
| When the vehicle is supposed to start the timetable.
uint16 | 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 | 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 19 of file base_consist.h.

## Member Function Documentation

void BaseConsist::CopyConsistPropertiesFrom | ( | const BaseConsist * | src | ) |

Copy properties of other BaseConsist.

Parameters

  src | Source for copying

Definition at line 28 of file base_consist.cpp.

References cur_implicit_order_index, cur_real_order_index, current_order_time, free(), HasBit(), lateness_counter, name, service_interval, SetBit(), stredup(), timetable_start, vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME, VF_AUTOFILL_TIMETABLE, and VF_TIMETABLE_STARTED.

Referenced by Vehicle::CopyVehicleConfigAndStatistics(), OrderBackup::DoRestore(), and OrderBackup::OrderBackup().

## Field Documentation

uint16 BaseConsist::vehicle_flags

Used for gradual loading and other miscellaneous things (.

See Also
  VehicleFlags enum)

Definition at line 32 of file base_consist.h.

Referenced by AfterLoadGame(), TimetableWindow::BuildArrivalDepartureList(), CalcPercentVehicleFilled(), CmdAutofillTimetable(), CmdBuildAircraft(), CmdBuildRailVehicle(), CmdBuildRoadVehicle(), CmdBuildShip(), CmdSetTimetableStart(), CopyConsistPropertiesFrom(), TimetableWindow::DrawWidget(), Vehicle::HandleLoading(), Vehicle::HandlePathfindingResult(), LoadUnloadVehicle(), TimetableWindow::OnClick(), TimetableWindow::OnPaint(), PrepareUnload(), and UpdateVehicleTimetable().

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

- src/base_consist.h
- src/base_consist.cpp