diff options
author | orwell96 <orwell@bleipb.de> | 2021-03-02 19:51:56 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-03-02 19:51:56 +0100 |
commit | 6135f8a23b4f507870dab481f4db466e6be0ac7d (patch) | |
tree | 29ea2d7912bba4e08c0dcc1c6da85712b45a2962 /advtrains_luaautomation/README.md | |
parent | db9e4429d789b5217a969de34ecd429c385c380b (diff) | |
download | advtrains-6135f8a23b4f507870dab481f4db466e6be0ac7d.tar.gz advtrains-6135f8a23b4f507870dab481f4db466e6be0ac7d.tar.bz2 advtrains-6135f8a23b4f507870dab481f4db466e6be0ac7d.zip |
LuaATC: add sending atc command to train by ID, and getters for in/out text (solves #124 and #166)
Diffstat (limited to 'advtrains_luaautomation/README.md')
-rw-r--r-- | advtrains_luaautomation/README.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/advtrains_luaautomation/README.md b/advtrains_luaautomation/README.md index 5232c22..683e45c 100644 --- a/advtrains_luaautomation/README.md +++ b/advtrains_luaautomation/README.md @@ -93,6 +93,9 @@ Removes any pending interrupts of this node. Make this active component send a digiline message on the specified channel. Not available in init code. + - `atc_send_to_train(<train_id>, <atc_command>)` + Sends the specified ATC command to the train specified by its train id. This happens regardless of where the train is in the world, and can be used to remote-control trains. Returns true on success. If the train ID does not exist, returns false and does nothing. See [atc_command.txt](../atc_command.txt) for the ATC command syntax. + #### Interlocking Route Management Functions If `advtrains_interlocking` is enabled, the following aditional functions can be used: @@ -230,6 +233,9 @@ In addition to the above environment functions, the following functions are avai - `atc_set_text_inside(text)` Set text shown to train passengers. Pass nil to show no text. `text` must be a string. + - `atc_set_text_inside(text) / atc_set_text_outside(text)` + Getters for inside/outside text, return nil when no train is there. + - `get_line()` Returns the "Line" property of the train (a string). This can be used to distinguish between trains of different lines and route them appropriately. |