This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
usage:nodes:atc_rail [2019-07-02 12:55] 82.67.173.193 created |
usage:nodes:atc_rail [2019-07-02 17:06] 82.67.173.193 added information to wiki article (2/4) |
||
---|---|---|---|
Line 10: | Line 10: | ||
===== Properties ===== | ===== Properties ===== | ||
- | Mod: '' | + | Mod: '' |
Node name: '' | Node name: '' | ||
Other names: | Other names: | ||
Line 141: | Line 141: | ||
This function is not available in init code. | This function is not available in init code. | ||
+ | |||
+ | ==== Interlocking functions ==== | ||
+ | |||
+ | Interlocking functions are available when the '' | ||
+ | |||
+ | === can_set_route(pos, | ||
+ | |||
+ | Checks whether it is possible to set the route designated by '' | ||
+ | |||
+ | It emits a warning and halts execution of Lua code in the following cases: | ||
+ | |||
+ | * the node at specified position is not a signal: | ||
+ | |||
+ | > 2019-01-01 15:00:00: WARNING[Server]: | ||
+ | |||
+ | * '' | ||
+ | |||
+ | > 2019-01-01 15:00:00: WARNING[Server]: | ||
+ | |||
+ | * the specified route does not exist: | ||
+ | |||
+ | > 2019-01-01 15:00:00: WARNING[Server]: | ||
+ | |||
+ | === set_route(pos, | ||
+ | |||
+ | Requests the route designated by '' | ||
+ | |||
+ | Same warnings apply as for '' | ||
+ | |||
+ | If the route can't be set, the signal remains red and waits for conflicting problems to be solved. Execution continues **immediately**. | ||
+ | |||
+ | === cancel_route(pos, | ||
+ | |||
+ | Cancels the route designated by '' | ||
+ | |||
+ | Same warnings apply as for '' | ||
+ | |||
+ | If the route has already been canceled, nothing happens. | ||
+ | |||
+ | === get_aspect(pos) === | ||
+ | |||
+ | Gets the aspect of the signal at '' | ||
+ | |||
+ | Same warnings apply as for '' | ||
+ | |||
+ | ==== Events ==== | ||
+ | |||
+ | In a LuaAutomation ATC controller, an event has the following format: | ||
+ | <code lua> | ||
+ | event = { | ||
+ | type = "< | ||
+ | < | ||
+ | -- additional content | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
===== Trivia ===== | ===== Trivia ===== | ||
The LuaAutomation ATC rail has the same texture as the [[usage: | The LuaAutomation ATC rail has the same texture as the [[usage: |