public void Startup()
 {
     this.panelState = base.module.deployState;
     if (this.panelState == ModuleDeployableSolarPanel.DeployState.EXTENDED)
     {
         core.EnableFailure("TestFlightFailure_SolarMechFail");
     }
     else
     {
         core.DisableFailure("TestFlightFailure_SolarMechFail");
     }
 }
        public override void Startup()
        {
            base.Startup();
            // We don't want this getting triggered as a random failure
            core.DisableFailure("TestFlightFailure_IgnitionFail");
            Part prefab = this.part.partInfo.partPrefab;

            foreach (PartModule pm in prefab.Modules)
            {
                TestFlightFailure_IgnitionFail modulePrefab = pm as TestFlightFailure_IgnitionFail;
                if (modulePrefab != null && modulePrefab.Configuration == configuration)
                {
                    if ((object)modulePrefab.baseIgnitionChance != null)
                    {
                        Log("IgnitionFail: Loading baseIgnitionChance from prefab");
                        baseIgnitionChance = modulePrefab.baseIgnitionChance;
                    }
                    if ((object)modulePrefab.pressureCurve != null)
                    {
                        Log("IgnitionFail: Loading pressureCurve from prefab");
                        pressureCurve = modulePrefab.pressureCurve;
                    }
                }
            }
        }
Beispiel #3
0
 public override void Startup()
 {
     base.Startup();
     if (core == null)
     {
         return;
     }
     // We don't want this getting triggered as a random failure
     core.DisableFailure("TestFlightFailure_IgnitionFail");
 }
        public static void DisableFailure(Part part, string alias, String failureModuleName)
        {
            ITestFlightCore core = TestFlightInterface.GetCore(part, alias);

            if (core == null)
            {
                return;
            }

            core.DisableFailure(failureModuleName);
        }
Beispiel #5
0
        public void Startup()
        {
            // We don't want this getting triggered as a random failure
            core.DisableFailure("TestFlightFailure_IgnitionFail");
            Part prefab = this.part.partInfo.partPrefab;

            foreach (PartModule pm in prefab.Modules)
            {
                TestFlightFailure_IgnitionFail modulePrefab = pm as TestFlightFailure_IgnitionFail;
                if (modulePrefab != null && modulePrefab.Configuration == configuration)
                {
                    ignitionFailureRate = modulePrefab.ignitionFailureRate;
                }
            }
            if (engineIndex > 0)
            {
                engine = new EngineModuleWrapper(this.part, engineIndex);
            }
            else
            {
                engine = new EngineModuleWrapper(this.part);
            }
        }