public void SetAllValues(AbortValues a) { if (a != null) { av = (AbortValues)a.Clone(); foreach (var p in EditorLogic.fetch.ship.parts) { var m = p.FindModuleImplementing <Module_BobsPanicBox>(); if (m != null) { m.SetAllValues(av); } } } }
public void SetAllValues(Vessel vessel, AbortValues a) { if (a != null) { av = (AbortValues)a.Clone(); foreach (var p in vessel.parts) { var m = p.FindModuleImplementing <Module_BobsPanicBox>(); if (m != null) { m.SetAllValues(av); } } } }
internal void EnableWindow(AbortValues a) { if (!visible) { abortValues = (AbortValues)a.Clone(); visible = true; if (HighLogic.LoadedSceneIsEditor) { curSceneStr = "Editor"; } else { curSceneStr = "Flight"; } } else { CloseWindow(); } }
public void SetAllValues(AbortValues a) { if (a != null) { this.armed = a.armed; this.vertSpeedTriggerEnabled = a.vertSpeedTriggerEnabled; this.vertSpeed = a.vertSpeed; this.gForceTriggerEnabled = a.gForceTriggerEnabled; this.gForceTrigger = a.gForceTrigger; this.exceedingAoA = a.exceedingAoA; this.maxAoA = a.maxAoA; this.explosiveTriggerEnabled = a.explosiveTriggerEnabled; this.disableAfter = a.disableAfter; this.actionAfterTimeout = a.actionAfterTimeout; this.disableAtAltitudeKm = a.disableAtAltitudeKm; this.disableAtAltitude = a.disableAtAltitudeKm * 1000; this.ignoreAoAAboveAltitudeKm = a.ignoreAoAAboveAltitudeKm; this.ignoreAoAAboveAltitude = a.ignoreAoAAboveAltitudeKm * 1000; this.maxTimeoutActionG = a.maxTimeoutActionG; this.postAbortAction = a.postAbortAction; this.postAbortDelay = a.postAbortDelay; this.delayPostAbortUntilSafe = a.delayPostAbortUntilSafe; av = (AbortValues)a.Clone(); foreach (var p in this.vessel.Parts) { var m = p.FindModuleImplementing <Module_BobsPanicBox>(); if (m != null) { m.SetAllValues(av); } } } }