This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
usage:atlatc:events [2020-01-28 10:18] orwell |
usage:atlatc:events [2021-04-28 14:28] orwell approach callbacks nouw released |
||
---|---|---|---|
Line 33: | Line 33: | ||
===== Event Types ===== | ===== Event Types ===== | ||
+ | |||
+ | ==== init ==== | ||
+ | The '' | ||
==== int ==== | ==== int ==== | ||
Line 55: | Line 58: | ||
</ | </ | ||
Fired when a node called '' | Fired when a node called '' | ||
+ | |||
+ | ==== schedule ==== | ||
+ | <code lua> | ||
+ | event = { | ||
+ | type = " | ||
+ | schedule = true, | ||
+ | msg = < | ||
+ | } | ||
+ | </ | ||
+ | Fired when an interrupt set by the '' | ||
==== digiline ==== | ==== digiline ==== | ||
Line 66: | Line 79: | ||
</ | </ | ||
Fired when the component receives a [[usage: | Fired when the component receives a [[usage: | ||
+ | |||
+ | ==== punch ==== | ||
+ | **Applicable for:** LuaATC Operation Panel | ||
+ | <code lua> | ||
+ | event = { | ||
+ | type = " | ||
+ | punch = true, | ||
+ | } | ||
+ | </ | ||
+ | Fired when a player punches the operation panel. | ||
+ | |||
+ | Note: Nodes other than the operation panel don't emit the '' | ||
==== train ==== | ==== train ==== | ||
Line 86: | Line 111: | ||
approach = true, | approach = true, | ||
id = < | id = < | ||
+ | has_entered = < | ||
} | } | ||
</ | </ | ||
Line 92: | Line 118: | ||
* **This function is available only in the '' | * **This function is available only in the '' | ||
* **This function is available only when the [[# | * **This function is available only when the [[# | ||
+ | |||
+ | `has_entered` is set to true when the tip of the train is already standing on the node, i.e. the " | ||
=== Approach callback mechanism === | === Approach callback mechanism === | ||
- | The approach callback mechanism is a new feature that allows LuaAutomation ATC rails to hook into the approach callback system, which is used by the [[usage: | ||
- | **At the time of writing (2019-12-18), | + | //since version 2.3.0// |
+ | |||
+ | The approach callback mechanism is a new feature that allows LuaAutomation ATC rails to hook into the approach callback system, which is used by the [[usage: | ||
To enable the feature, define the following global variable in the local environment of the ATC rail: | To enable the feature, define the following global variable in the local environment of the ATC rail: |