@@ -83,7 +83,6 @@ public class TrainCarOperationsWindow : Window
83
83
public int SeparatorCount ;
84
84
public int SpacerRowCount ;
85
85
public int SymbolsRowCount ;
86
- public bool BrakeHoseCarCoupling ;
87
86
88
87
public ControlLayout Client ;
89
88
public bool CarPositionChanged ;
@@ -500,8 +499,6 @@ void AddSpace()
500
499
// Allows to resize the window according to the carPosition value.
501
500
if ( RowsCount > carPosition ) RowsCount = carPosition ;
502
501
if ( SeparatorCount > carPosition - 1 ) SeparatorCount = carPosition - 1 ;
503
-
504
- BrakeHoseCarCoupling = false ; // All brake hoses checked
505
502
}
506
503
}
507
504
return Vbox ;
@@ -606,11 +603,6 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull)
606
603
PlayerTrain = Owner . Viewer . PlayerTrain ;
607
604
if ( LastPlayerTrainCars != Owner . Viewer . PlayerTrain . Cars . Count || ! LayoutUpdated )
608
605
{
609
- // Updates brake hoses
610
- if ( LastPlayerTrainCars > 0 && PlayerTrain . Cars . Count > LastPlayerTrainCars && ( ( PlayerTrain . Cars [ LastPlayerTrainCars ] as MSTSWagon ) . BrakeSystem . FrontBrakeHoseConnected != ( PlayerTrain . Cars [ LastPlayerTrainCars - 1 ] as MSTSWagon ) . BrakeSystem . RearBrakeHoseConnected ) )
611
- {
612
- BrakeHoseCarCoupling = true ; // Enable to check all brake hoses when coupling cars
613
- }
614
606
LayoutUpdated = true ;
615
607
Layout ( ) ;
616
608
localScrollLayout ( SelectedCarPosition ) ;
@@ -846,25 +838,10 @@ public buttonFrontBrakeHose(int x, int y, int size, Viewer viewer, TrainCar car,
846
838
{
847
839
Viewer = viewer ;
848
840
TrainCarViewer = Viewer . TrainCarOperationsViewerWindow ;
849
- TrainCarOperations = Viewer . TrainCarOperationsWindow ;
850
841
CarOperations = Viewer . CarOperationsWindow ;
851
- var PlayerTrain = Viewer . PlayerTrain ;
852
842
853
843
CarPosition = carPosition ;
854
844
First = car == viewer . PlayerTrain . Cars . First ( ) ;
855
- if ( CarPosition > 0 && TrainCarOperations . BrakeHoseCarCoupling )
856
- { // Sometimes when coupling cars. The front brake hose of the new car and the brake hose of the previous car are not synchronised.
857
- var frontBrakeHoseCurrentCar = ( PlayerTrain . Cars [ CarPosition ] as MSTSWagon ) . BrakeSystem . FrontBrakeHoseConnected ;
858
- var rearBrakeHosePreviousCar = ( PlayerTrain . Cars [ CarPosition - 1 ] as MSTSWagon ) . BrakeSystem . RearBrakeHoseConnected ;
859
- if ( frontBrakeHoseCurrentCar && ! rearBrakeHosePreviousCar )
860
- {
861
- new WagonBrakeHoseConnectCommand ( Viewer . Log , ( PlayerTrain . Cars [ CarPosition ] as MSTSWagon ) , ! ( PlayerTrain . Cars [ CarPosition ] as MSTSWagon ) . BrakeSystem . FrontBrakeHoseConnected ) ;
862
- }
863
- else if ( ! frontBrakeHoseCurrentCar && rearBrakeHosePreviousCar )
864
- {
865
- new WagonBrakeHoseRearConnectCommand ( Viewer . Log , ( PlayerTrain . Cars [ CarPosition - 1 ] as MSTSWagon ) , ! ( PlayerTrain . Cars [ CarPosition - 1 ] as MSTSWagon ) . BrakeSystem . RearBrakeHoseConnected ) ;
866
- }
867
- }
868
845
Texture = First ? BrakeHoseFirstDis : ( viewer . PlayerTrain . Cars [ carPosition ] as MSTSWagon ) . BrakeSystem . FrontBrakeHoseConnected ? BrakeHoseCon : BrakeHoseDis ;
869
846
870
847
// Allows compatibility with CarOperationWindow
0 commit comments