Vehicle descriptors
Definition at line 85 of file api_obj_desc.cc.
◆ can_be_first()
bool vehicle_desc_x::can_be_first |
( |
| ) |
|
- Returns
- true if this vehicle can lead a convoy
◆ can_be_last()
bool vehicle_desc_x::can_be_last |
( |
| ) |
|
- Returns
- true if this vehicle can be the last of a convoy
◆ get_available_vehicles()
- Returns
- a list of all available vehicles at the current in-game-time
◆ get_capacity()
integer vehicle_desc_x::get_capacity |
( |
| ) |
|
◆ get_freight()
- Returns
- freight that can be transported (or null)
◆ get_length()
integer vehicle_desc_x::get_length |
( |
| ) |
|
◆ get_maintenance()
integer vehicle_desc_x::get_maintenance |
( |
| ) |
|
- Returns
- fixed cost in 1/100 credits per month
◆ get_power()
integer vehicle_desc_x::get_power |
( |
| ) |
|
Power of the vehicle. This value can be used in convoy_x::calc_max_speed. It returns (power of vehicle in kW) * (gear value) * 64, where power and gear are as shown in-game.
- Returns
- the total power of the vehicle (takes power and gear from pak-files into account)
◆ get_predecessors()
- Returns
- list of possible predecessors, if list is empty then all are allowed (if can_be_first returns true, or no predecessors are allowed if can_be_first is false).
◆ get_running_cost()
integer vehicle_desc_x::get_running_cost |
( |
| ) |
|
- Returns
- running cost in 1/100 credits per tile
◆ get_successors()
- Returns
- list of possible successors, if list is empty then all are allowed (if can_be_last returns true, or no successors are allowed if can_be_last is false).
◆ get_weight()
integer vehicle_desc_x::get_weight |
( |
| ) |
|
- Returns
- weight of the empty vehicle
◆ is_coupling_allowed()
Checks if the coupling of first
and second
is possible in this order.
- Parameters
-
- Returns
- true if coupling is possible
◆ needs_electrification()
bool vehicle_desc_x::needs_electrification |
( |
| ) |
|
- Returns
- true if this vehicle needs electrification (and is powered)
The documentation for this class was generated from the following file: