void Update() { if (FlightGlobals.ActiveVessel == null) { return; } bool inAtmo = FlightGlobals.ActiveVessel.atmDensity != 0; if (wasInAtmo && !inAtmo) { ModuleCSToggle.disableGlobal(true); } if (!wasInAtmo && inAtmo) { ModuleCSToggle.enableGlobal(true); } wasInAtmo = inAtmo; }
public void UpdateCurrentAtmosphereState(GameEvents.HostedFromToAction <Vessel, Vessel.Situations> data) { if (FlightGlobals.ActiveVessel == null) { return; } bool inAtmo = FlightGlobals.ActiveVessel.atmDensity != 0; if (wasInAtmo && !inAtmo) { ModuleCSToggle.disableGlobal(true); } if (!wasInAtmo && inAtmo) { ModuleCSToggle.enableGlobal(true); } wasInAtmo = inAtmo; }