Simutrans-Squirrel-API
Public Member Functions | Static Public Member Functions | List of all members
vehicle_desc_x Class Reference
Inheritance diagram for vehicle_desc_x:
obj_desc_transport_x obj_desc_time_x obj_desc_x extend_get

Public Member Functions

bool can_be_first ()
 
bool can_be_last ()
 
array< vehicle_desc_xget_successors ()
 
array< vehicle_desc_xget_predecessors ()
 
integer get_power ()
 
good_desc_x get_freight ()
 
integer get_capacity ()
 
integer get_running_cost ()
 
integer get_maintenance ()
 
integer get_weight ()
 
integer get_length ()
 
- Public Member Functions inherited from obj_desc_transport_x
integer get_maintenance ()
 
integer get_cost ()
 
way_types get_waytype ()
 
integer get_topspeed ()
 
- Public Member Functions inherited from obj_desc_time_x
time_x get_intro_date ()
 
time_x get_retire_date ()
 
bool is_future (time_x time)
 
bool is_retired (time_x time)
 
bool is_available (time_x time)
 
- Public Member Functions inherited from obj_desc_x
string get_name ()
 
bool is_equal (obj_desc_x other)
 
bool is_valid ()
 

Static Public Member Functions

static array< vehicle_desc_xget_available_vehicles (way_types)
 
static bool is_coupling_allowed (vehicle_desc_x first, vehicle_desc_x second)
 

Detailed Description

Vehicle descriptors

Definition at line 76 of file api_obj_desc.cc.

Member Function Documentation

bool vehicle_desc_x::can_be_first ( )
Returns
true if this vehicle can lead a convoy
bool vehicle_desc_x::can_be_last ( )
Returns
true if this vehicle can be the last of a convoy
static array<vehicle_desc_x> vehicle_desc_x::get_available_vehicles ( way_types  )
static
Returns
a list of all available vehicles at the current in-game-time
integer vehicle_desc_x::get_capacity ( )
Returns
capacity
good_desc_x vehicle_desc_x::get_freight ( )
Returns
freight that can be transported (or null)
integer vehicle_desc_x::get_length ( )
Returns
lengths in units::CARUNITS_PER_TILE
integer vehicle_desc_x::get_maintenance ( )
Returns
fixed cost in 1/100 credits per month
integer vehicle_desc_x::get_power ( )
Returns
the power of the vehicle (takes power and gear from pak-files into account)
array<vehicle_desc_x> vehicle_desc_x::get_predecessors ( )
Returns
list of possible predecessors, if all are allowed then list is empty
integer vehicle_desc_x::get_running_cost ( )
Returns
running cost in 1/100 credits per tile
array<vehicle_desc_x> vehicle_desc_x::get_successors ( )
Returns
list of possible successors, if all are allowed then list is empty
integer vehicle_desc_x::get_weight ( )
Returns
weight of the empty vehicle
static bool vehicle_desc_x::is_coupling_allowed ( vehicle_desc_x  first,
vehicle_desc_x  second 
)
static

Checks if the coupling of first and second is possible in this order.

Parameters
first
second
Returns
true if coupling is possible

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