This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
usage:atlatc:api [2021-02-17 23:38] orwell add api of commit 5232c22f |
usage:atlatc:api [2022-07-01 18:05] 56independent [Interrupts] Remove "does" |
||
---|---|---|---|
Line 78: | Line 78: | ||
=== interrupt_safe(time, | === interrupt_safe(time, | ||
- | //since version 3.0// | + | //since version |
- | Like '' | + | Like '' |
===interrupt_pos(pos, | ===interrupt_pos(pos, | ||
Line 88: | Line 88: | ||
=== clear_interrupts() === | === clear_interrupts() === | ||
- | //since version 3.0// | + | //since version |
Removes any pending interrupts (both of type ' | Removes any pending interrupts (both of type ' | ||
+ | ==== Remote ATC ==== | ||
+ | |||
+ | //since version 2.3.0// | ||
+ | |||
+ | In addition to '' | ||
+ | |||
+ | === atc_send_to_train(train_id, | ||
+ | |||
+ | Sends the specified [[usage: | ||
+ | |||
+ | The ATC command is instantly applied to the train in question, regardless of where it is and what it is doing. It also cancels any active ATC command of the train. | ||
+ | |||
+ | Calling this function from an ATC rail is independent of any train that stands on the rail and does not affect it (except of course when train_id happens to be the ID of the train on the rail). | ||
==== Railway Time ==== | ==== Railway Time ==== | ||
Line 97: | Line 110: | ||
When '' | When '' | ||
- | For the available functions, see [[dev:lines:rwt]]. | + | For the available functions, see [[dev:proposals:rwt:rwt_api]]. |
< | < | ||
Line 209: | Line 222: | ||
=== atc_set_text_inside(text) === | === atc_set_text_inside(text) === | ||
Sets the text shown inside the train and returns '' | Sets the text shown inside the train and returns '' | ||
+ | |||
+ | === atc_get_text_outside() / atc_get_text_inside() === | ||
+ | Gets the outside/ | ||
=== get_line() === | === get_line() === | ||
Line 224: | Line 240: | ||
Sets the line property of the train, as a string. | Sets the line property of the train, as a string. | ||
- | On [[usage: | + | On [[usage: |
If there is no train, same behavior as [[# | If there is no train, same behavior as [[# | ||
Line 237: | Line 253: | ||
If there is no train, same behavior as [[# | If there is no train, same behavior as [[# | ||
+ | |||
+ | === train_length() === | ||
+ | Returns the number of wagons in a train. | ||
=== set_shunt() === | === set_shunt() === | ||
Line 246: | Line 265: | ||
=== atc_set_ars_disable(value) === | === atc_set_ars_disable(value) === | ||
+ | |||
+ | //since version 2.3.0// | ||
+ | |||
Enables ('' | Enables ('' | ||
This function has essentially the same effect as the ATC command '' | This function has essentially the same effect as the ATC command '' | ||
- | |||
- | **This function is experimental and currently available only in the '' | ||
=== atc_set_lzb_tsr(speed) === | === atc_set_lzb_tsr(speed) === | ||
+ | |||
+ | //since version 2.3.0// | ||
Adds a Temporary Speed Restriction at the current rail, so that the train is passing the rail at the specified '' | Adds a Temporary Speed Restriction at the current rail, so that the train is passing the rail at the specified '' | ||
Line 261: | Line 283: | ||
* This function is only accessible during '' | * This function is only accessible during '' | ||
- | **This function is experimental | + | === set_autocouple() === |
+ | |||
+ | Enables Autocouple mode. When the train hits another standing train, it couples to it and continues with its current ATC target speed in the same direction. | ||
+ | |||
+ | In contrast to the '' | ||
+ | |||
+ | //since version 2.4.0:// | ||
+ | |||
+ | The train that is initiating the coupling (that is, the train that is driving and whose mode is set to autocouple) is guaranteed to retain its Train ID. | ||
+ | |||
+ | === unset_autocouple() === | ||
+ | |||
+ | Disables the Autocouple mode. | ||
==== Fields ==== | ==== Fields ==== |