Add: conditional order to test if a train is driving backwards#15484
Add: conditional order to test if a train is driving backwards#15484PeterN merged 1 commit intoOpenTTD:masterfrom
Conversation
bc5cf8b to
20c238b
Compare
20c238b to
a444374
Compare
|
Might be wrong, haven't had a chance to test, but wouldn't "arrived at last stop backwards" be more accurate? Or something like that? I can see the wording is tricky, seems like a fiddly behaviour. |
Sort of. The order before the conditional doesn't have to be the "last stop", e.g. a waypoint of go via order. |
|
Alright, any way to reduce the length of this updated string? "Driving backwards at reduced speed" Maybe "Driving backwards slowly" but it feels wrong. |
|
I wonder, maybe just make it so that the driving backwards check only matches true if there's no cab and leave the strings alone entirely? Only reason I can really think of to use this condition is if the reversing is going to incur a penalty to begin with. |
|
Yes, that is what I'm doing, I'm just quibbling (by myself) about the wording of the text :) |

Motivation / Problem
Trains can now drive backwards. #15391 adds the possibility for any train to drive backwards at a reduced speed.
Description
This PR adds a conditional order condition to test if a train is driving backwards. This allows it to be routed differently depending on whether it is driving forwards or backwards.
Limitations
Due to how orders are evaluated at stations, the current driving direction is tested rather than the driving direction after starting to move, so the flag may be "outdated" when testing at stations. It's still usable but can be fiddly.
(It also kinda depends on #15391 to be more useful)
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.