Пример #1
0
        public override void Initialize()
        {
            if ((GearBox != null) && (GearBoxController == null))
            {
                if (!GearBox.IsInitialized)
                {
                    GearBox = null;
                }
                else
                {
                    foreach (DieselEngine de in DieselEngines)
                    {
                        if (de.GearBox == null)
                        {
                            de.GearBox = new GearBox(GearBox, de);
                        }
                        //if (this.Train.TrainType == Train.TRAINTYPE.AI)
                        //    de.GearBox.GearBoxOperation = GearBoxOperation.Automatic;
                    }
                    GearBoxController = new MSTSNotchController(DieselEngines[0].GearBox.NumOfGears + 1);
                }
            }

            DieselEngines.Initialize(false);

            base.Initialize();
        }
Пример #2
0
        public override void Initialize()
        {
            if (GearBox != null && !GearBox.IsInitialized)
            {
                GearBox = null;
            }

            DieselEngines.Initialize(false);

            base.Initialize();

            // If DrvWheelWeight is not in ENG file, then calculate drivewheel weight freom FoA

            if (DrvWheelWeightKg == 0)     // if DrvWheelWeightKg not in ENG file.
            {
                DrvWheelWeightKg = MassKG; // set Drive wheel weight to total wagon mass if not in ENG file
            }
        }