@@ -68,9 +68,9 @@ public class MSTSWagon : TrainCar
6868 {
6969 public Pantographs Pantographs ;
7070 public ScriptedPassengerCarPowerSupply PassengerCarPowerSupply => PowerSupply as ScriptedPassengerCarPowerSupply ;
71-
72- public Door RightDoor ;
73- public Door LeftDoor ;
71+ public Doors Doors ;
72+ public Door RightDoor => Doors . RightDoor ;
73+ public Door LeftDoor => Doors . LeftDoor ;
7474 public bool MirrorOpen ;
7575 public bool UnloadingPartsOpen ;
7676 public bool WaitForAnimationReady ; // delay counter to start loading/unliading is on;
@@ -346,8 +346,7 @@ public MSTSWagon(Simulator simulator, string wagFilePath)
346346 : base ( simulator , wagFilePath )
347347 {
348348 Pantographs = new Pantographs ( this ) ;
349- RightDoor = new Door ( this , true ) ;
350- LeftDoor = new Door ( this , false ) ;
349+ Doors = new Doors ( this ) ;
351350 }
352351
353352 public void Load ( )
@@ -954,8 +953,7 @@ public void GetMeasurementUnits()
954953 public override void Initialize ( )
955954 {
956955 Pantographs . Initialize ( ) ;
957- RightDoor . Initialize ( ) ;
958- LeftDoor . Initialize ( ) ;
956+ Doors . Initialize ( ) ;
959957 PassengerCarPowerSupply ? . Initialize ( ) ;
960958
961959 base . Initialize ( ) ;
@@ -1380,6 +1378,10 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
13801378 case "wagon(ortspantographs" :
13811379 Pantographs . Parse ( lowercasetoken , stf ) ;
13821380 break ;
1381+ case "wagon(ortsdoors(closingdelay" :
1382+ case "wagon(ortsdoors(openingdelay" :
1383+ Doors . Parse ( lowercasetoken , stf ) ;
1384+ break ;
13831385 case "wagon(ortspowersupply" :
13841386 case "wagon(ortspowerondelay" :
13851387 case "wagon(ortsbattery(mode" :
@@ -1544,8 +1546,7 @@ public virtual void Copy(MSTSWagon copy)
15441546 foreach ( MSTSCoupling coupler in copy . Couplers )
15451547 Couplers . Add ( coupler ) ;
15461548 Pantographs . Copy ( copy . Pantographs ) ;
1547- LeftDoor . Copy ( copy . LeftDoor ) ;
1548- RightDoor . Copy ( copy . RightDoor ) ;
1549+ Doors . Copy ( copy . Doors ) ;
15491550 if ( copy . FreightAnimations != null )
15501551 {
15511552 FreightAnimations = new FreightAnimations ( copy . FreightAnimations , this ) ;
@@ -1679,8 +1680,7 @@ public override void Save(BinaryWriter outf)
16791680 foreach ( MSTSCoupling coupler in Couplers )
16801681 coupler . Save ( outf ) ;
16811682 Pantographs . Save ( outf ) ;
1682- LeftDoor . Save ( outf ) ;
1683- RightDoor . Save ( outf ) ;
1683+ Doors . Save ( outf ) ;
16841684 PassengerCarPowerSupply ? . Save ( outf ) ;
16851685 if ( FreightAnimations != null )
16861686 {
@@ -1733,8 +1733,7 @@ public override void Restore(BinaryReader inf)
17331733 MaxHandbrakeForceN = inf . ReadSingle ( ) ;
17341734 Couplers = ReadCouplersFromSave ( inf ) . ToList ( ) ;
17351735 Pantographs . Restore ( inf ) ;
1736- LeftDoor . Restore ( inf ) ;
1737- RightDoor . Restore ( inf ) ;
1736+ Doors . Restore ( inf ) ;
17381737 PassengerCarPowerSupply ? . Restore ( inf ) ;
17391738 if ( FreightAnimations != null )
17401739 {
@@ -1907,8 +1906,7 @@ public override void Update(float elapsedClockSeconds)
19071906
19081907 Pantographs . Update ( elapsedClockSeconds ) ;
19091908
1910- LeftDoor . Update ( elapsedClockSeconds ) ;
1911- RightDoor . Update ( elapsedClockSeconds ) ;
1909+ Doors . Update ( elapsedClockSeconds ) ;
19121910
19131911 MSTSBrakeSystem . Update ( elapsedClockSeconds ) ;
19141912
0 commit comments