Add wildcards for train composition, bidirectionality and wagon count
Posted: Mon Oct 28, 2024 12:39 pm
TL;DR
For interrupts add wildcards that are replaced by the train composition, bidirectionality or wagon count.What?
Add three new wildcards for interrupts:Train composition
For use in station names this gets replaced by the composition of the train, e.g. [item=locomotive][item=cargo-wagon][item=cargo-wagon][item=cargo-wagon][item=locomotive].
There should be 2 extra flavors for this: Replace any wagon with [virtual-signal=any-wagon] and replace any locomotive with [virtual-signal=any-locomotive] for use with mods that define new locomotives. This would be useful for refueling stops as they only care about where the locomotives are.
Note: If there can't be 3 flavors of this then use the last one, with everything mapped to the virtual signals. It's the most useful for refueling.
Train bidirectionality
For use in stations names this gets replaced by [virtual-signal=signal-train-bidirectional] if the train has locomotives facing both ways.
The use case for this is when both through stations and end stations are being used. Only bidirectional trains can go to end stations but both types can go to through stations. This symbol would be included in the station name and interrupt to filter out the right stations.
Train wagon count
For use in station names this gets replaced by the number of wagons in the train, not counting locomotives, e.g. for the above train: [virtual-signal=signal-4].
The reason why locomotives are excluded is so that an LCCCC and LCCCCL train can use the same through station.