Let Auto bring the back of the train to 0, hand-set or not

Auto now clears the hand-set marks before picking the couplers and is
available on the last vehicle too.
This commit is contained in:
maj00r
2026-10-04 18:15:01 +02:00
parent b4ae9164bb
commit 384d8c1bca
8 changed files with 33 additions and 7 deletions

View File

@@ -82,6 +82,20 @@ public class ConsistTailTests
Assert.Equal(0, first.Cars[0].Coupling.Flags);
}
[Fact]
public void The_auto_button_frees_the_back_even_when_it_was_set_by_hand()
{
Append("b111-01");
var last = Append("b111-02");
last.Cars[0].Coupling.Flags = 3;
last.Cars[0].CouplerSetByHand = true;
_consist.AutoCouple();
Assert.Equal(0, last.Cars[0].Coupling.Flags);
Assert.False(last.Cars[0].CouplerSetByHand);
}
private ConsistItem Append(string skin)
{
var item = new ConsistItem