mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-21 15:54:58 +01:00
Keep a last-vehicle coupler set by hand
The back of the consist goes to 0 after every change unless its coupler was set in the editor; a car that gets a neighbour loses that mark, so it is freed again once it is last again.
This commit is contained in:
@@ -207,6 +207,7 @@ public sealed class VehicleDetails
|
||||
check.IsCheckedChanged += (_, _) =>
|
||||
{
|
||||
d.Coupling.Set(bit, check.IsChecked == true);
|
||||
d.CouplerSetByHand = true;
|
||||
_redraw();
|
||||
};
|
||||
Grid.SetRow(check, i / 2);
|
||||
@@ -229,6 +230,7 @@ public sealed class VehicleDetails
|
||||
{
|
||||
if (unitIdx <= 0) return;
|
||||
d.Coupling.Flags = Consist.TailCar(_consist[unitIdx - 1]).Coupling.Flags;
|
||||
d.CouplerSetByHand = true;
|
||||
_redraw();
|
||||
Refresh();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user