Difference between revisions of "TrainCarts/Signs/Mutex/en"
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 4: | Line 4: | ||
== Introduction == | == Introduction == | ||
+ | [[File:Mutexworking.png|thumb|A mutex sign prevents a train from entering the intersection while another train is inside]] | ||
The mutex sign handles mutual exclusion: it blocks trains from entering while another train is already inside the zone. Once the zone is freed up again, the waiting trains are allowed to continue movement. This sign is useful in combination with switcher signs to avoid crashing trains. Levers attached to the base block are toggled while a train is inside the mutex zone. | The mutex sign handles mutual exclusion: it blocks trains from entering while another train is already inside the zone. Once the zone is freed up again, the waiting trains are allowed to continue movement. This sign is useful in combination with switcher signs to avoid crashing trains. Levers attached to the base block are toggled while a train is inside the mutex zone. | ||
Multiple mutex signs can be combined by naming them the same, combining the cuboid areas of effect they occupy. This way more complex zones can be created. | Multiple mutex signs can be combined by naming them the same, combining the cuboid areas of effect they occupy. This way more complex zones can be created. | ||
− | |||
== Syntax == | == Syntax == | ||
Line 31: | Line 31: | ||
* Third line: Name (optional), multiple mutex signs with the same name form a single combined mutex zone | * Third line: Name (optional), multiple mutex signs with the same name form a single combined mutex zone | ||
* Fourth line: [[Special:MyLanguage/TrainCarts/Signs/Statements|Statement]] (optional), each sign with the same name adds to a list of statements. Prepend & or | to switch between AND and OR logic. | * Fourth line: [[Special:MyLanguage/TrainCarts/Signs/Statements|Statement]] (optional), each sign with the same name adds to a list of statements. Prepend & or | to switch between AND and OR logic. | ||
+ | |||
+ | === Smart Mutex === | ||
+ | [[File:Smartmutex.png|thumb|Smart Mutex allows two trains to pass while blocking two others]] | ||
+ | The Smart Mutex is a mutex sign that checks the paths trains (will) take through the mutex zones, allowing trains to pass that don't have a path intersecting with one another. This allows multiple trains to cross an intersection at the same time provided they can safely pass each other. | ||
+ | |||
+ | {{sign|[train]|smartmutex 2}} | ||
+ | |||
+ | |||
+ | {{sign|[train]|smutex 5/6/8}} | ||
+ | |||
+ | ==== Prediction ==== | ||
+ | When checking the path a train will take through the smart mutex zone, switchers are taken into account. The current switched state of the rails is then not important. | ||
+ | |||
+ | == Debug == | ||
+ | [[File:Debugmutex.png|thumb|Smart Mutex boundaries displayed using the /train debug mutex command]] | ||
+ | Use '''/train debug mutex''' to temporarily display the exact boundaries of nearby mutex zones. |
Revision as of 17:58, 7 June 2022
Introduction
The mutex sign handles mutual exclusion: it blocks trains from entering while another train is already inside the zone. Once the zone is freed up again, the waiting trains are allowed to continue movement. This sign is useful in combination with switcher signs to avoid crashing trains. Levers attached to the base block are toggled while a train is inside the mutex zone.
Multiple mutex signs can be combined by naming them the same, combining the cuboid areas of effect they occupy. This way more complex zones can be created.
Syntax
- First line: [train]. The sign does not have to be powered.
- Second line: mutex, which without further arguments will create a cuboid zone around the sign of 1x2x1 (x/y/z). When followed by one number, the number sets all cuboid x/y/z-radius values at once. When followed by a second number, the first number sets the x/z-radius and the second number the y-radius. With 3 parameters, each x/y/z radius can be specified.
- Third line: Name (optional), multiple mutex signs with the same name form a single combined mutex zone
- Fourth line: Statement (optional), each sign with the same name adds to a list of statements. Prepend & or | to switch between AND and OR logic.
Smart Mutex
The Smart Mutex is a mutex sign that checks the paths trains (will) take through the mutex zones, allowing trains to pass that don't have a path intersecting with one another. This allows multiple trains to cross an intersection at the same time provided they can safely pass each other.
Prediction
When checking the path a train will take through the smart mutex zone, switchers are taken into account. The current switched state of the rails is then not important.
Debug
Use /train debug mutex to temporarily display the exact boundaries of nearby mutex zones.