From 6135f8a23b4f507870dab481f4db466e6be0ac7d Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 2 Mar 2021 19:51:56 +0100 Subject: LuaATC: add sending atc command to train by ID, and getters for in/out text (solves #124 and #166) --- advtrains_luaautomation/README.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'advtrains_luaautomation/README.md') 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(, )` + 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. -- cgit v1.2.3