Functions for working with trains.
local train = require("__flib__.train")
|get_main_locomotive(train)||Get the main locomotive in a given train.|
|get_backer_name(train)||Get the backer_name of the main locomotive in a given train.|
|rotate_carriage(entity)||Rotate a single carriage of a train.|
|get_composition_string(train)||Create a string representing train composition.|
|open_gui(player_index, train)||Open train GUI for one player.|
Get the main locomotive in a given train.
Get the backer_name of the main locomotive in a given train.
Rotate a single carriage of a train.
Create a string representing train composition.
‘<L<’ and ‘>L>’ for locomotives, ‘C’ for cargo wagons, ‘F’ for fluid wagons, ‘A’ for artillery wagon.Parameters:
Open train GUI for one player.
A table with the following fields: