1515// You should have received a copy of the GNU General Public License
1616// along with Open Rails. If not, see <http://www.gnu.org/licenses/>.
1717
18+ using Microsoft . Xna . Framework ;
19+ using Orts . Parsers . Msts ;
1820using System ;
19- using System . Collections ;
2021using System . Collections . Generic ;
2122using System . Diagnostics ;
2223using System . IO ;
2324using System . Linq ;
24- using Microsoft . Xna . Framework ;
25- using Orts . Parsers . Msts ;
2625
2726namespace Orts . Formats . Msts
2827{
2928
30- // TODO - this is an incomplete parse of the cvf file.
31- public class CabViewFile
32- {
29+ // TODO - this is an incomplete parse of the cvf file.
30+ public class CabViewFile
31+ {
3332 public List < Vector3 > Locations = new List < Vector3 > ( ) ; // Head locations for front, left and right views
3433 public List < Vector3 > Directions = new List < Vector3 > ( ) ; // Head directions for each view
3534 public List < string > TwoDViews = new List < string > ( ) ; // 2D CAB Views - by GeorgeS
@@ -38,7 +37,7 @@ public class CabViewFile
3837 public CabViewControls CabViewControls ; // Controls in CAB - by GeorgeS
3938
4039 public CabViewFile ( string filePath , string basePath )
41- {
40+ {
4241 using ( STFReader stf = new STFReader ( filePath , false ) )
4342 stf . ParseFile ( new STFReader . TokenProcessor [ ] {
4443 new STFReader . TokenProcessor ( "tr_cabviewfile" , ( ) => { stf . MustMatch ( "(" ) ; stf . ParseBlock ( new STFReader . TokenProcessor [ ] {
@@ -1276,6 +1275,8 @@ public CVCScreen(STFReader stf, string basepath)
12761275 new STFReader . TokenProcessor ( "graphic" , ( ) => { ParseGraphic ( stf , basepath ) ; } ) ,
12771276 new STFReader . TokenProcessor ( "units" , ( ) => { ParseUnits ( stf ) ; } ) ,
12781277 new STFReader . TokenProcessor ( "parameters" , ( ) => { ParseCustomParameters ( stf ) ; } ) ,
1278+ new STFReader . TokenProcessor ( "disablediflowvoltagepowersupplyoff" , ( ) => { ParseDisabledIfLowVoltagePowerSupplyOff ( stf ) ; } ) ,
1279+ new STFReader . TokenProcessor ( "disabledifcabpowersupplyoff" , ( ) => { ParseDisabledIfCabPowerSupplyOff ( stf ) ; } ) ,
12791280 } ) ;
12801281 }
12811282 protected void ParseCustomParameters ( STFReader stf )
0 commit comments