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)
13471347 case "wagon(ortspowersupplyheatingpower" :
13481348 case "wagon(ortspowersupplyairconditioningpower" :
13491349 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 )
13511355 {
13521356 PowerSupply = new ScriptedPassengerCarPowerSupply ( this ) ;
13531357 }
1354- PassengerCarPowerSupply . Parse ( lowercasetoken , stf ) ;
1358+ PassengerCarPowerSupply ? . Parse ( lowercasetoken , stf ) ;
13551359 break ;
13561360
13571361 case "wagon(intakepoint" : IntakePointList . Add ( new IntakePoint ( stf ) ) ; break ;
You can’t perform that action at this time.
0 commit comments