usage:atlatc:events
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| usage:atlatc:events [2020-01-28 09:25] – orwell | usage:atlatc:events [2023-10-29 15:30] (current) – [approach] orwell | ||
|---|---|---|---|
| Line 33: | Line 33: | ||
| ===== Event Types ===== | ===== Event Types ===== | ||
| + | |||
| + | ==== init ==== | ||
| + | The '' | ||
| ==== int ==== | ==== int ==== | ||
| Line 83: | Line 86: | ||
| type = " | type = " | ||
| punch = true, | punch = true, | ||
| + | name = name of puncher | ||
| } | } | ||
| </ | </ | ||
| Line 99: | Line 103: | ||
| </ | </ | ||
| Fired when a train enters the rail. The field '' | Fired when a train enters the rail. The field '' | ||
| - | If the world contains trains | + | If the world contains trains |
| ==== approach ==== | ==== approach ==== | ||
| Line 108: | Line 112: | ||
| approach = true, | approach = true, | ||
| id = < | id = < | ||
| + | has_entered = < | ||
| } | } | ||
| </ | </ | ||
| Fired when a train approaches the rail. This event may be generated multiple times for the same train. | Fired when a train approaches the rail. This event may be generated multiple times for the same train. | ||
| - | * **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: | ||
| Line 140: | Line 147: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| + | * '' | ||
usage/atlatc/events.1580203512.txt.gz · Last modified: by orwell
