User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

dev:core:lzb
LZB

The LZB system is used to make trains aware of oncoming speed restrictions or blocked tracks. It provides and works together with the approach node callback.

advtrains.lzb_add_checkpoint()

This function adds a “LZB Checkpoint” for the specified ''train'' Table at the specified index. This causes the following things to happen:

  • The train will brake appropriately so that at 'index' its speed is 'speed' or less
  • In the moment the train passes 'index', 'callback' will be executed
advtrains.lzb_add_checkpoint(train, index, speed, callback, udata)
udata: Arbitrary data to be saved with the checkpoint. There is no official interface on how to access this, it is only used internally for the "Remote Routesetting" button.

The 'callback' has the following synopsis:

callback = function(pos, id, train, index, speed, lzbdata)
The parameters are identical to lzb_add_checkpoint, except
lzbdata: Should be ignored for now.
dev/core/lzb.txt · Last modified: 2019-04-16 08:00 by 141.76.181.9