This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
dev:proposals:new-ks [2022-04-01 16:54] ywang |
dev:proposals:new-ks [2022-12-07 12:50] ywang |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Implementation: | ||
+ | //Please refer to the source code for implementation details and API documentation. This information is provided here. The filenames provided below are relative to '' | ||
+ | |||
+ | * The distant signaling API is implemented in '' | ||
+ | * Formspecs have been partially modified to support distant signaling. Some formspecs are now implemented in various '' | ||
+ | * Signal aspect accessors have been modified and are now found in '' | ||
+ | * Type 2 signals (" | ||
+ | * A '' | ||
+ | |||
+ | **The changes break a few minor things:** | ||
+ | |||
+ | * The signal aspect formspec uses dropdown indexing, which requires Minetest 5.4.0 or later. | ||
+ | * '' | ||
+ | * The results are cached. | ||
+ | * The signal aspect is " | ||
+ | * '' | ||
+ | * There is no API for setting the signal aspect while bypassing the cache and signal aspect adjustments, | ||
+ | |||
+ | It is planned to merge the newly introduced signal aspect cache with its counterpart in the routesetting system. | ||
+ | |||
+ | Please refer to the source code (listed above) for details. | ||
====== Proposal: Distant signaling (second draft) ====== | ====== Proposal: Distant signaling (second draft) ====== | ||
- | // | + | //This draft has been superseded. Please refer to the actual implementation (mentioned above).// |
//This draft is mainly written to address the issues that appeared in the first draft. In particular, it addresses a request to implement route signaling.// | //This draft is mainly written to address the issues that appeared in the first draft. In particular, it addresses a request to implement route signaling.// | ||
Line 44: | Line 65: | ||
=== Supported aspects === | === Supported aspects === | ||
The table of supported aspects should include the following fields: | The table of supported aspects should include the following fields: | ||
+ | * '' | ||
+ | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
+ | |||
+ | When registering, | ||
+ | * '' | ||
* '' | * '' | ||
Line 55: | Line 82: | ||
=== Signal aspect translation === | === Signal aspect translation === | ||
- | * When a distant signal defined with the alternative signal aspect definition table is assigned to a signal that is not defined with the same signal aspect table, the distant signal is always given the //n-1//th entry (with //n// being the number of defined main aspects of the distant signal) unless the main aspect of the upcoming signal is -1, in which case the distant signal is given the first entry of the defined main aspects of the distant signal. | + | * When a distant signal defined with the alternative signal aspect definition table is assigned to a signal that is not defined with the same signal aspect table, the distant signal is always given the //n-1//th entry (with //n// being the number of defined main aspects of the distant signal) unless the main aspect of the upcoming signal is -1, in which case the distant signal is given the first entry of the defined main aspects of the distant signal, or an entry in the translation table can be used to determine the distant signal aspect. |
* When a distant signal defined with the current signal aspect definition table is assigned to a signal defined with the alternative current signal aspect definition table, the '' | * When a distant signal defined with the current signal aspect definition table is assigned to a signal defined with the alternative current signal aspect definition table, the '' | ||