User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

dev:core:train

This is an old revision of the document!


''train'' Table

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
dev/core/train.1673450927.txt.gz · Last modified: 2023-01-11 16:28 by 56independent