Ejemplo n.º 1
0
 private void ParseActivityDetails(STFReader stf)
 {
     stf.MustMatchBlockStart();
     stf.ParseBlock(new STFReader.TokenProcessor[] {
         new STFReader.TokenProcessor("player_service_definition", () => { PlayerServices = new PlayerServices(stf); }),
         new STFReader.TokenProcessor("nextserviceuid", () => { NextServiceUiD = stf.ReadIntBlock(null); }),
         new STFReader.TokenProcessor("nextactivityobjectuid", () => { NextActivityObjectUiD = stf.ReadIntBlock(null); }),
         new STFReader.TokenProcessor("ortsaihornatcrossings", () => { AIHornAtCrossings = stf.ReadIntBlock(AIHornAtCrossings); }),
         new STFReader.TokenProcessor("events", () => { Events = new ActivityEvents(stf); }),
         new STFReader.TokenProcessor("traffic_definition", () => { Traffic = new Traffic(stf); }),
         new STFReader.TokenProcessor("activityobjects", () => { ActivityObjects = new ActivityObjects(stf); }),
         new STFReader.TokenProcessor("platformnumpassengerswaiting", () => { PlatformWaitingPassengers = new PlatformPassengersWaiting(stf); }), // 35 files. To test, use EUROPE1\ACTIVITIES\aftstorm.act
         new STFReader.TokenProcessor("activityfailedsignals", () => { FailedSignals = new FailedSignals(stf); }),
         new STFReader.TokenProcessor("activityrestrictedspeedzones", () => { ActivityRestrictedSpeedZones = new RestrictedSpeedZones(stf); }),   // 27 files. To test, use EUROPE1\ACTIVITIES\lclsrvce.act
     });
 }
Ejemplo n.º 2
0
 private void ParseActivityDetails(STFReader stf)
 {
     stf.MustMatchBlockStart();
     stf.ParseBlock(new STFReader.TokenProcessor[] {
         new STFReader.TokenProcessor("player_service_definition", () => { PlayerServices = new PlayerServices(stf); }),
         new STFReader.TokenProcessor("nextserviceuid", () => { NextServiceUiD = stf.ReadIntBlock(null); }),
         new STFReader.TokenProcessor("nextactivityobjectuid", () => { NextActivityObjectUiD = stf.ReadIntBlock(null); }),
         new STFReader.TokenProcessor("events", () => { Events = new ActivityEvents(stf); }),
         new STFReader.TokenProcessor("traffic_definition", () => { Traffic = new Traffic(stf); }),
         new STFReader.TokenProcessor("activityobjects", () => { ActivityObjects = new ActivityObjects(stf); }),
         new STFReader.TokenProcessor("platformnumpassengerswaiting", () => { PlatformWaitingPassengers = new PlatformPassengersWaiting(stf); }), // 35 files. To test, use EUROPE1\ACTIVITIES\aftstorm.act
         new STFReader.TokenProcessor("activityfailedsignals", () => { FailedSignals = new FailedSignals(stf); }),
         new STFReader.TokenProcessor("activityrestrictedspeedzones", () => { ActivityRestrictedSpeedZones = new RestrictedSpeedZones(stf); }),   // 27 files. To test, use EUROPE1\ACTIVITIES\lclsrvce.act
         new STFReader.TokenProcessor("ortsaihornatcrossings", () => { AIBlowsHornAtLevelCrossings = stf.ReadIntBlock(Convert.ToInt32(AIBlowsHornAtLevelCrossings)) > 0; }),
         new STFReader.TokenProcessor("ortsaicrossinghornpattern", () => { if (EnumExtension.GetValue(stf.ReadStringBlock(""), out LevelCrossingHornPattern value))
                                                                           {
                                                                               AILevelCrossingHornPattern = value;
                                                                           }
                                      })
     });