Handheld remote control for use with Advtrains
Maverick2797 c7ed099e11 Fix nil loco_id crash when loco is removed from world | %!s(int64=2) %!d(string=hai) anos | |
---|---|---|
LICENSES | %!s(int64=2) %!d(string=hai) anos | |
textures | %!s(int64=2) %!d(string=hai) anos | |
README.md | %!s(int64=2) %!d(string=hai) anos | |
init.lua | %!s(int64=2) %!d(string=hai) anos | |
mod.conf | %!s(int64=2) %!d(string=hai) anos | |
screenshot.png | %!s(int64=2) %!d(string=hai) anos |
This mod provides a rebindable remote control for use with the advtrains mod.
Punch a locomotive with the controller to bind it to that locomotive. The controller will remain bound to the locomotive specifically, not the train as a whole, enabling the user to retain control of the locomotive during shunting when the train id may change.
Note: the controller will only bind to locomotives, i.e. anything with is_locomotive = true
in the advtrains registered definition.
To rebind the controller to another locomotive simply click the Bind To New Train
button. The saved locomotive will be erased from memory, ready for the user to rebind as above.
The External Display
, Internal Display
, Routing Code
and Line
fields are read from the bound train when the user punches to use the controller. If any of these fields change between reading from the train and when the user clicks Update Train Info
then the changes made will be written to the train, overwriting any changes that the train may have accumulated in the meantime (e.g. Inside Display text being changed by a station track.)
The Set Speed
field is also read from the train when the user uses the controller, except that it will read the train's actual speed at the time. The speed will only be sent to the train when the Confirm
button is clicked.
The Send ATC
field performs exactly as if the train passed over an ATC track section in the direction of the arrow. The user can use this to pre-program manoeuvres instead of constantly returning to the controller. See the documentation for the ATC Controller for commands and syntax. The command is immediately sent to the train when Send
is clicked and not kept in memory across controller uses.
The Disable ARS
and Autocouple
checkboxes also will be read from the train when the user uses the controller. Autocouple
will show as ticked if the train has been set to couple by either the Cpl
ATC command or set_autocouple()
LuaATC command. Manually ticking the checkbox has the same effect as set_autocouple()
. Disable ARS
requires the advtrains_interlocking
sub-mod to be enabled to be effective, and has the equivalent effect as the A
ATC command and atc_set_ars_disable()
LuaATC command.
Due to the ability to control a train from anywhere on the server, the train_admin
priv is required to use this tool.
This work is protected under the following licenses:
A copy of each license is included in the LICENSES
folder
Thanks to yw05 for the inspiration from the original train_remote mod which was written in Lisp.