File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Source/Orts.Simulation/Simulation/RollingStocks Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1347,11 +1347,15 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
1347
1347
case "wagon(ortspowersupplyheatingpower" :
1348
1348
case "wagon(ortspowersupplyairconditioningpower" :
1349
1349
case "wagon(ortspowersupplyairconditioningyield" :
1350
- if ( PassengerCarPowerSupply == null )
1350
+ if ( this is MSTSLocomotive )
1351
+ {
1352
+ Trace . TraceWarning ( $ "Defining the { lowercasetoken } parameter is forbidden for locomotives (in { stf . FileName } :line { stf . LineNumber } )") ;
1353
+ }
1354
+ else if ( PassengerCarPowerSupply == null )
1351
1355
{
1352
1356
PowerSupply = new ScriptedPassengerCarPowerSupply ( this ) ;
1353
1357
}
1354
- PassengerCarPowerSupply . Parse ( lowercasetoken , stf ) ;
1358
+ PassengerCarPowerSupply ? . Parse ( lowercasetoken , stf ) ;
1355
1359
break ;
1356
1360
1357
1361
case "wagon(intakepoint" : IntakePointList . Add ( new IntakePoint ( stf ) ) ; break ;
You can’t perform that action at this time.
0 commit comments