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 |
---|---|---|
`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 |