This is an old revision of the document!
Note
Information here is incomplete. Please fill in what you know.
The train
table is an essential table to Advtrains.
train
itself is a shorthand used as an argument in many functions for advtrains.trains[id]
, where [id]
is the id of a train.
train
holds a whole array of information about the train, some shown below:
Key | Description | Unit |
---|---|---|
acceleration | The acceleration the train is performing | m/s/s |
drives_on | A table showing which type of track the train drives on | Table |
max_speed | The speed a train can go at | m/s |
trainparts | The carriages in a train | table |
is_shunt | Train in shunt mode? | bool |
speed_restriction | The speed a train is allowed to go at | m/s |
routingcode | The routing code of a train | Minetest text encoding |
line | The line of a train | Minetest text encoding |
velocity | The speed of a train | m/s |
movedir | Direction of movement | ?? |
brake | Wether brakes are enabled | bool |
path | table of key-co-ordinate table pairs | table |
id | Train ID | string |