User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

usage:atlatc:latcrail

This is an old revision of the document!


LuaAutomation ATC rail

LuaATC rails are the core component of the LuaAutomation system. They are used to automate trains by running custom Lua code whenever an event occurs.

Note: this page has been written for Advtrains 2.1.0 and Minetest 5.1.0. Examples and practices described in this page don't take advantage of improvements introduced in later releases.

Properties

Placer Item name: advtrains_luaautomation:dtrack_placer
Node names:

  • advtrains_luaautomation:dtrack_st
  • advtrains_luaautomation:dtrack_st_30
  • advtrains_luaautomation:dtrack_st_45
  • advtrains_luaautomation:dtrack_st_60

Craft recipe

This node has no craft recipe.

Extended description

  • When the rail is first built, this rail node does nothing. But once right-clicking (or double tapping on Android) the node, a formspec displays, allowing you to write Lua code for the current node.
  • Interacting with the ATC rail requires the atlatc privilege.
  • This node can be rotated with the Trackworker.
  • Only straight nodes are supported. You can't put this node on a curve or as a switch.

Operation

The LuaATC Rail is an active LuaATC component. It holds Lua code that is executed on specific Events, and interacts with the world using the LuaATC Programming Interface.

Every LuaATC rail must belong to an Environment. You can select the active environment using the dropdown on the top left.

Note: you have to create an environment before LuaATC components can be used. See Creating an Environment.

Trivia

The LuaAutomation ATC rail has the same texture as the ATC controller rail, but its functions are different.

usage/atlatc/latcrail.1619613656.txt.gz · Last modified: 2021-04-28 14:40 by admin