User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

dev:core:tracktype

Tracktype

A tracktype is a string identifier that uniquely identifies a train track of a certain kind. It has been introduced to allow for tracks of different gauges or rail systems (like maglev tracks, linetrack).

Track nodes carry groups that identify them as tracks. They have the form:

advtrains_track_<tracktype> = 1

The default tracks (from advtrains_train_track) have the tracktype default.

drives_on

The drives_on table of wagons determines on which tracktypes a wagon can drive. Typically, this is only a single tracktype, however it is allowed to specify multiple. The tracktypes a train drives on are determined using the cut set of the wagon's drives_on's. (this happens in advtrains.update_trainpart_properties())

advtrains.all_tracktypes

This table contains all registered tracktypes in the form <tracktype> = true. This is also the format that advtrains.is_track_and_drives_on accepts.

dev/core/tracktype.txt · Last modified: 2019/12/02 14:30 by orwell