@@ -442,6 +442,7 @@ void AddSpace(bool full)
442442 line . Add ( new buttonToggleMU ( 0 , 0 , textHeight , Owner . Viewer , CarPosition ) ) ;
443443 AddSpace ( false ) ;
444444 }
445+
445446 line . Add ( new buttonTogglePower ( 0 , 0 , textHeight , Owner . Viewer , CarPosition ) ) ;
446447 AddSpace ( false ) ;
447448 if ( ( wagon != null ) && ( wagon . PowerSupply is IPowerSupply ) )
@@ -894,7 +895,6 @@ public buttonFrontAngleCock(int x, int y, int size, Viewer viewer, TrainCar car,
894895 Viewer = viewer ;
895896 TrainCarViewer = Viewer . TrainCarOperationsViewerWindow ;
896897 CurrentCar = Viewer . PlayerTrain . Cars [ carPosition ] ;
897- var first = car == Viewer . PlayerTrain . Cars . First ( ) ;
898898
899899 if ( CurrentCar . BrakeSystem is VacuumSinglePipe )
900900 {
@@ -904,15 +904,11 @@ public buttonFrontAngleCock(int x, int y, int size, Viewer viewer, TrainCar car,
904904 {
905905 var carAngleCockAOpenAmount = CurrentCar . BrakeSystem . AngleCockAOpenAmount ;
906906 var carAngleCockAOpen = ( CurrentCar as MSTSWagon ) . BrakeSystem . AngleCockAOpen ;
907- Texture = ! TrainCarViewer . TrainCarOperationsChanged && first ? FrontAngleCockClosed
908- : carAngleCockAOpenAmount > 0 && carAngleCockAOpenAmount < 1 ? FrontAngleCockPartial
907+ Texture = carAngleCockAOpenAmount > 0 && carAngleCockAOpenAmount < 1 ? FrontAngleCockPartial
909908 : carAngleCockAOpen ? FrontAngleCockOpened
910909 : FrontAngleCockClosed ;
911910
912- if ( ! first )
913- {
914- Click += new Action < Control , Point > ( buttonFrontAngleCock_Click ) ;
915- }
911+ Click += new Action < Control , Point > ( buttonFrontAngleCock_Click ) ;
916912 }
917913 Source = new Rectangle ( 0 , 0 , size , size ) ;
918914 }
@@ -945,7 +941,6 @@ public buttonRearAngleCock(int x, int y, int size, Viewer viewer, TrainCar car,
945941 Viewer = viewer ;
946942 TrainCarViewer = Viewer . TrainCarOperationsViewerWindow ;
947943 CurrentCar = Viewer . PlayerTrain . Cars [ carPosition ] ;
948- var last = car == Viewer . PlayerTrain . Cars . Last ( ) ;
949944
950945 if ( CurrentCar . BrakeSystem is VacuumSinglePipe )
951946 {
@@ -955,15 +950,11 @@ public buttonRearAngleCock(int x, int y, int size, Viewer viewer, TrainCar car,
955950 {
956951 var carAngleCockBOpenAmount = ( CurrentCar as MSTSWagon ) . BrakeSystem . AngleCockBOpenAmount ;
957952 var carAngleCockBOpen = ( CurrentCar as MSTSWagon ) . BrakeSystem . AngleCockBOpen ;
958- Texture = last ? RearAngleCockClosed
959- : carAngleCockBOpenAmount > 0 && carAngleCockBOpenAmount < 1 ? RearAngleCockPartial
953+ Texture = carAngleCockBOpenAmount > 0 && carAngleCockBOpenAmount < 1 ? RearAngleCockPartial
960954 : carAngleCockBOpen ? RearAngleCockOpened
961955 : RearAngleCockClosed ;
962956
963- if ( ! last )
964- {
965- Click += new Action < Control , Point > ( buttonRearAngleCock_Click ) ;
966- }
957+ Click += new Action < Control , Point > ( buttonRearAngleCock_Click ) ;
967958 }
968959 Source = new Rectangle ( 0 , 0 , size , size ) ;
969960 }
@@ -1099,7 +1090,7 @@ public buttonToggleMU(int x, int y, int size, Viewer viewer, int carPosition)
10991090 CurrentCar = Viewer . PlayerTrain . Cars [ carPosition ] ;
11001091
11011092 MultipleUnitsConfiguration = Viewer . PlayerLocomotive . GetMultipleUnitsConfiguration ( ) ;
1102- if ( CurrentCar is MSTSDieselLocomotive && MultipleUnitsConfiguration != null )
1093+ if ( CurrentCar is MSTSLocomotive && MultipleUnitsConfiguration != null )
11031094 {
11041095 Texture = Viewer . TrainCarOperationsWindow . ModifiedSetting || ( ( CurrentCar as MSTSLocomotive ) . RemoteControlGroup == 0 && MultipleUnitsConfiguration != "1" ) ? MUconnected : MUdisconnected ;
11051096 }
@@ -1112,7 +1103,7 @@ public buttonToggleMU(int x, int y, int size, Viewer viewer, int carPosition)
11121103 }
11131104 void buttonToggleMU_Click ( Control arg1 , Point arg2 )
11141105 {
1115- if ( CurrentCar is MSTSDieselLocomotive )
1106+ if ( CurrentCar is MSTSLocomotive )
11161107 {
11171108 MSTSLocomotive locomotive = CurrentCar as MSTSLocomotive ;
11181109
0 commit comments