This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dev:proposals:new-ks [2022-07-03 08:38] ywang |
dev:proposals:new-ks [2023-03-26 10:10] (current) ywang |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | //This draft documents | + | //Please refer to the source code for implementation |
- | ===== Distant signal API ===== | + | * The distant |
- | The distant | + | * Formspecs have been partially modified to support distant signaling. Some formspecs are now implemented |
+ | * Signal aspect accessors have been modified and are now found in '' | ||
+ | * A signal aspect | ||
+ | * A '' | ||
- | Internally, the method of assignment (i.e. whether the signal is assigned manually or by the routesetting system) is irrelevant to the API. However, this information is kept. | + | **The changes break a few minor things:** |
- | Distant | + | * 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, | ||
+ | * '' | ||
+ | * When setting a field of the signal aspect object to '' | ||
+ | * Certain features of signal aspect objects are implemented using metatables. These objects | ||
- | ===== Signal assignment ===== | + | It is planned |
- | The signal formapecs have been slightly reworked | + | |
- | + | ||
- | Automatic signal assignment is partially implemented. Distant signals are assigned when the route is set. However, automatically unassigning signals is not yet implemented. | + | |
- | + | ||
- | ===== Signal aspect accessors ===== | + | |
- | * The signal aspect | + | |
- | * '' | + | |
- | * Update the distant signals | + | |
- | * Adjust the signal aspect based on the signal type and the distant signal assignment. | + | |
- | * The '' | + | |
- | + | ||
- | ===== Route signaling ===== | + | |
- | Route signals share a similar aspect table as traditional speed signals, | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | Conversion between speed signal aspect tables and route signal aspect tables is possible, although currently with a few minor issues. | + | |
- | + | ||
- | The corresponding API is implemented in '' | + | |
+ | Please refer to the source code (listed above) for details. | ||
====== Proposal: Distant signaling (second draft) ====== | ====== Proposal: Distant signaling (second draft) ====== | ||
- | //There is currently some work on implementing distant signaling. Differences between the proposal and the implementation | + | //This draft has been superseded. Please refer to the actual |
//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.// |