diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-06-10 17:30:50 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-06-10 17:30:50 +0200 |
commit | 38d10acca24e5a34671a1a71f12923002d06253d (patch) | |
tree | a72aa02902af4dd37bbfa753bdb1ef651e72be88 /advtrains_luaautomation/README.txt | |
parent | 3e29cba6af2e19909b6d143cecaec877aaf3a7bd (diff) | |
parent | 8d8e8c1553bc631b8f357005b506bc651de9a138 (diff) | |
download | advtrains-38d10acca24e5a34671a1a71f12923002d06253d.tar.gz advtrains-38d10acca24e5a34671a1a71f12923002d06253d.tar.bz2 advtrains-38d10acca24e5a34671a1a71f12923002d06253d.zip |
Merge branch 'master' of https://github.com/orwell96/advtrains
Diffstat (limited to 'advtrains_luaautomation/README.txt')
-rw-r--r-- | advtrains_luaautomation/README.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/advtrains_luaautomation/README.txt b/advtrains_luaautomation/README.txt index ce4d45d..faf3cbb 100644 --- a/advtrains_luaautomation/README.txt +++ b/advtrains_luaautomation/README.txt @@ -63,6 +63,10 @@ setstate(pos, newstate) Set the state of the passive component at position 'pos'. pos can be either a position vector (created by POS()) or a string, the name of this passive component. +is_passive(pos) +Checks whether there is a passive component at the position pos (and/or whether a passive component with this name exists) +pos can be either a position vector (created by POS()) or a string, the name of this passive component. + interrupt(time, message) Cause LuaAutomation to trigger an 'int' event on this component after the given time in seconds with the specified 'message' field. 'message' can be of any Lua data type. Not available in init code! @@ -71,6 +75,10 @@ interrupt_pos(pos, message) Immediately trigger an 'ext_int' event on the active component at position pos. 'message' is like in interrupt(). USE WITH CARE, or better don't use! Incorrect use can result in expotential growth of interrupts. +digiline_send(channel, message) +Make this active component send a digiline message on the specified channel. +Not available in init code! + ## Components and events The event table is a table of the following format: @@ -110,6 +118,9 @@ Fired when an interrupt set by the 'interrupt' function runs out. 'message' is t {type="ext_int", ext_int=true, message=<message>} Fired when another node called 'interrupt_pos' on this position. 'message' is the message passed to the interrupt_pos function. +{type="digiline", digiline=true, channel=<channel>, msg=<message>} +Fired when the controller receives a digiline message. + In addition to the default environment functions, the following functions are available: atc_send(<atc_command>) @@ -132,7 +143,7 @@ set_line(number) # Operator panel This simple node executes its actions when punched. It can be used to change a switch and update the corresponding signals or similar applications. -The event fired is {type="punch", punch=true} by default. In case of an interrupt, the events are similar to the ones of the ATC rail. +The event fired is {type="punch", punch=true} by default. In case of an interrupt or a digiline message, the events are similar to the ones of the ATC rail. ### Passive components |