User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

usage:atlatc:events

This is an old revision of the document!


Events

In a LuaAutomation ATC controller, an event has the following format:

event = {
    type = "<type>",
    <type> = true,
    -- additional content
}

You can check for a specific event type by using

if event.type == "<wanted>" then
    -- ... do stuff
end

or

if event.<wanted> == true then
    -- ... do stuff
end

int

event = {
    type = "int",
    int = true,
    msg = <message>,
    message = <message>, -- For backwards compatibility only!
}

Fired when an interrupt set by the interrupt function runs out. <message> is the message passed to the function. For backwards compatibility reasons, the message is also contained in the event.message field.

ext_int

event = {
    type = "ext_int",
    ext_int = true,
    message = <message>,
}

Fired when a node called interrupt_pos on this node's position. <message> is the message passed to the function.

digiline

event = {
    type = "digiline",
    digiline = true,
    channel = <channel>,
    msg = <message>,
}

Fired when the rail receives a Digiline message.

usage/atlatc/events.1579856952.txt.gz · Last modified: 2020-01-24 10:09 by orwell