@@ -236,51 +236,13 @@ public enum WindowState
236236 public float BearingHotBoxSmokeDurationS ;
237237 public float BearingHotBoxSmokeVelocityMpS = 15.0f ;
238238 public Color BearingHotBoxSmokeSteadyColor = Color . Gray ;
239-
240- /// <summary>
241- /// True if vehicle is equipped with an additional emergency brake reservoir
242- /// </summary>
243- public bool EmergencyReservoirPresent ;
244- public enum BrakeValveType
245- {
246- None ,
247- TripleValve , // Plain triple valve
248- Distributor , // Triple valve with graduated release
249- DistributingValve , // Triple valve + driver brake valve control. Only for locomotives
250- }
251- /// <summary>
252- /// Type of brake valve in the car
253- /// </summary>
254- public BrakeValveType BrakeValve ;
255- /// <summary>
256- /// True if equipped with handbrake. (Not common for older steam locomotives.)
257- /// </summary>
258- public bool HandBrakePresent ;
259- /// <summary>
260- /// Number of available retainer positions. (Used on freight cars, mostly.) Might be 0, 3 or 4.
261- /// </summary>
262- public int RetainerPositions ;
263-
264- /// <summary>
265- /// Indicates whether a brake is present or not when Manual Braking is selected.
266- /// </summary>
267- public bool ManualBrakePresent ;
239+ List < string > BrakeEquipment ;
268240
269241 /// <summary>
270242 /// Indicates whether a non auto (straight) brake is present or not when braking is selected.
271243 /// </summary>
272244 public bool NonAutoBrakePresent ;
273245
274- /// <summary>
275- /// Indicates whether an auxiliary reservoir is present on the wagon or not.
276- /// </summary>
277- public bool AuxiliaryReservoirPresent ;
278-
279- /// <summary>
280- /// Indicates whether an additional supply reservoir is present on the wagon or not.
281- /// </summary>
282- public bool SupplyReservoirPresent ;
283-
284246 /// <summary>
285247 /// Active locomotive for a control trailer
286248 /// </summary>
@@ -1372,30 +1334,11 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
13721334 case "wagon(brakesystemtype" :
13731335 CarBrakeSystemType = stf . ReadStringBlock ( null ) . ToLower ( ) ;
13741336 BrakeSystem = MSTSBrakeSystem . Create ( CarBrakeSystemType , this ) ;
1337+ MSTSBrakeSystem ? . SetBrakeEquipment ( BrakeEquipment ) ;
13751338 break ;
13761339 case "wagon(brakeequipmenttype" :
1377- foreach ( var equipment in stf . ReadStringBlock ( "" ) . ToLower ( ) . Replace ( " " , "" ) . Split ( ',' ) )
1378- {
1379- switch ( equipment )
1380- {
1381- case "triple_valve" : BrakeValve = BrakeValveType . TripleValve ; break ;
1382- case "distributor" :
1383- case "graduated_release_triple_valve" : BrakeValve = BrakeValveType . Distributor ; break ;
1384- case "distributing_valve" : BrakeValve = BrakeValveType . DistributingValve ; break ;
1385- case "emergency_brake_reservoir" : EmergencyReservoirPresent = true ; break ;
1386- case "handbrake" : HandBrakePresent = true ; break ;
1387- case "auxilary_reservoir" : // MSTS legacy parameter - use is discouraged
1388- case "auxiliary_reservoir" :
1389- AuxiliaryReservoirPresent = true ;
1390- break ;
1391- case "manual_brake" : ManualBrakePresent = true ; break ;
1392- case "retainer_3_position" : RetainerPositions = 3 ; break ;
1393- case "retainer_4_position" : RetainerPositions = 4 ; break ;
1394- case "supply_reservoir" :
1395- SupplyReservoirPresent = true ;
1396- break ;
1397- }
1398- }
1340+ BrakeEquipment = stf . ReadStringBlock ( "" ) . ToLower ( ) . Replace ( " " , "" ) . Split ( ',' ) . ToList ( ) ;
1341+ MSTSBrakeSystem ? . SetBrakeEquipment ( BrakeEquipment ) ;
13991342 break ;
14001343 case "wagon(coupling" :
14011344 Couplers . Add ( new MSTSCoupling ( ) ) ; // Adds a new coupler every time "Coupler" parameters found in WAG and INC file
@@ -1741,13 +1684,6 @@ public virtual void Copy(MSTSWagon copy)
17411684 IsGreaseFrictionBearing = copy . IsGreaseFrictionBearing ;
17421685 CarBrakeSystemType = copy . CarBrakeSystemType ;
17431686 BrakeSystem = MSTSBrakeSystem . Create ( CarBrakeSystemType , this ) ;
1744- EmergencyReservoirPresent = copy . EmergencyReservoirPresent ;
1745- BrakeValve = copy . BrakeValve ;
1746- HandBrakePresent = copy . HandBrakePresent ;
1747- ManualBrakePresent = copy . ManualBrakePresent ;
1748- AuxiliaryReservoirPresent = copy . AuxiliaryReservoirPresent ;
1749- SupplyReservoirPresent = copy . SupplyReservoirPresent ;
1750- RetainerPositions = copy . RetainerPositions ;
17511687 InteriorShapeFileName = copy . InteriorShapeFileName ;
17521688 InteriorSoundFileName = copy . InteriorSoundFileName ;
17531689 Cab3DShapeFileName = copy . Cab3DShapeFileName ;
0 commit comments