get_train_by_id(train_id) | → LuaTrain? | Searches for a train with given ID. |
Searches for a train with given ID. | ||
get_trains(filter) | → array[LuaTrain] | Gets all trains that pass given filter |
Gets all trains that pass given filter | ||
get_train_stops(filter) | → array[LuaEntity] | Gets all train stops that pass given filter |
Gets all train stops that pass given filter | ||
request_train_path{type?=…, train?=…, goals=…, return_path?=…, starts?=…, search_direction?=…, in_chain_signal_section?=…, steps_limit?=…, shortest_path?=…} | → TrainPathFinderOneGoalResult or TrainPathAllGoalsResult | Direct access to train pathfinder. [...] |
Direct access to train pathfinder. [...] | ||
valid | :: R boolean | Is this object valid? [...] |
Is this object valid? [...] | ||
object_name | :: R string | The class name of this object. [...] |
The class name of this object. [...] |
filter | :: TrainFilter | Filters the train must pass in order to be returned here |
Filters the train must pass in order to be returned here |
filter | :: TrainStopFilter | Filters the train stop must pass in order to be returned here |
Filters the train stop must pass in order to be returned here |
type | :: TrainPathRequestType? | Request type. Determines the return type of the method. Defaults to |
Request type. Determines the return type of the method. Defaults to | ||
train | :: LuaTrain? | Mandatory if |
Mandatory if | ||
goals | :: array[TrainPathFinderGoal] | |
return_path | :: boolean? | Only relevant if request type is |
Only relevant if request type is | ||
starts | :: array[RailEndStart]? | Manually provided starting positions. |
Manually provided starting positions. | ||
search_direction | :: "respect-movement-direction" or "any-direction-with-locomotives" ? | Only relevant if |
Only relevant if | ||
in_chain_signal_section | :: boolean? | Defaults to |
Defaults to | ||
steps_limit | :: uint? | Maximum amount of steps pathfinder is allowed to perform. |
Maximum amount of steps pathfinder is allowed to perform. | ||
shortest_path | :: boolean? | Defaults to |
Defaults to |
→ TrainPathFinderOneGoalResult or TrainPathAllGoalsResult | The type of the returned value depends on |