|
Simutrans-Squirrel-API
125.0r12321
|

Static Public Member Functions | |
| static integer | calc_max_speed (integer power, integer weight, integer speed_limit) |
| static integer | speed_to_tiles_per_month (integer speed) |
Class to access a convoy. Player vehicles are convoys, which themselves consist of individual vehicles (trucks, trailers, ...).
Definition at line 38 of file api_convoy.cc.
|
static |
Static method to compute the potential max speed of a convoy with the given parameters.
| power | total power of convoy |
| weight | weight of convoy |
| speed_limit | speed limit induced by convoy's vehicles |
| array<integer> convoy_x::get_capacity | ( | ) |
Get monthly statistics of capacity.
| array<integer> convoy_x::get_cost | ( | ) |
Get monthly statistics of running costs.
| integer convoy_x::get_distance_traveled_total | ( | ) |
| array<integer> convoy_x::get_goods_catg_index | ( | ) |
Returns array of goods categories that can be transported by this convoy.
| coord3d convoy_x::get_home_depot | ( | ) |
| line_x convoy_x::get_line | ( | ) |
| integer convoy_x::get_loading_level | ( | ) |
| integer convoy_x::get_loading_limit | ( | ) |
| string convoy_x::get_name | ( | ) |
Name of convoy.
| coord3d convoy_x::get_pos | ( | ) |
Position of convoy.
| array<integer> convoy_x::get_profit | ( | ) |
Get monthly statistics of profit.
| array<integer> convoy_x::get_revenue | ( | ) |
Get monthly statistics of revenue.
| schedule_x convoy_x::get_schedule | ( | ) |
Schedule of this convoy.
| integer convoy_x::get_speed | ( | ) |
| integer convoy_x::get_tile_length | ( | ) |
| array<integer> convoy_x::get_transported_goods | ( | ) |
Get monthly statistics of number of transported goods.
| array<integer> convoy_x::get_traveled_distance | ( | ) |
Get monthly statistics of traveled distance.
| array<vehicle_desc_x> convoy_x::get_vehicles | ( | ) |
| array<integer> convoy_x::get_way_tolls | ( | ) |
Get monthly statistics of income/loss due to way tolls.
| bool convoy_x::has_no_route | ( | ) |
Route search for the current schedule entry failed, and the convoy cannot reach its next stop. This is the condition displayed as "no route". The convoy retries the route search on its own.
| bool convoy_x::has_obsolete_vehicles | ( | ) |
| integer convoy_x::is_followed | ( | ) |
| bool convoy_x::is_in_depot | ( | ) |
| bool convoy_x::is_loading | ( | ) |
| bool convoy_x::is_schedule_editor_open | ( | ) |
Checks if the schedule of the convoy is currently being edited. A convoy on the map is halted while its schedule dialog is open, which is synchronized in network games. Opening the schedule of a convoy inside a depot does not stop anything and happens only on the client with the dialog: there the answer is only visible where the dialog is open.
| bool convoy_x::is_stuck | ( | ) |
The convoy has been unable to proceed for long enough that the game reports it as stuck: it is waiting for way clearance, or waiting to start, and has been doing so for more than two months. This is the condition displayed as "stuck", and it is the same one the convoy list filters on.
A convoy that is merely waiting at a signal is not stuck; use is_waiting for that. A convoy with no route is not stuck either; use has_no_route.
| bool convoy_x::is_valid | ( | ) |
| bool convoy_x::is_waiting | ( | ) |
| bool convoy_x::is_withdrawn | ( | ) |
| bool convoy_x::needs_electrification | ( | ) |
Does convoy needs electrified ways?
|
static |
Static method to convert speed (from km per hour) to tiles per month.
| speed |
1.8.13