public override bool MeetRequirements() { // Must have the "KIS" mod installed (otherwise Kemini is disabled anyway) if (!DependancyChecker.HasKIS) { return(false); } // Must have successfully reached orbit and landed a kerballed craft var progress = ProgressTracking.Instance.GetBodyTree(Planetarium.fetch.Home); if (progress == null || !progress.returnFromOrbit.IsCompleteManned) { return(false); } // Must be able to perform EVAs if (ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.AstronautComplex) < 0.1f) { return(false); } // And must have unlocked the tech-tiers for the first KEES experiment and the Exposure bracket return(NE_Helper.IsPartTechAvailable(KEES_PEC)); // && NE_Helper.IsPartTechAvailable(KEES_PPMD)); }
private List <Experiment> getUnlockedKEESExperiments() { List <Experiment> unlockedParts = new List <Experiment>(); for (int idx = 0, count = experimentParts.Count; idx < count; idx++) { var exp = experimentParts[idx]; if (NE_Helper.IsPartTechAvailable(exp.getPartName())) { unlockedParts.Add(exp); } } return(unlockedParts); }
/** Returns a collection of all KEES experiments which have been unlocked in the Science Centre. */ public static ReadOnlyCollection <Experiment> getUnlockedExperiments() { List <Experiment> unlockedParts = new List <Experiment>(); var ExperimentParts = KEESExperimentRegister.getExperiments(); for (int idx = 0, count = ExperimentParts.Count; idx < count; idx++) { var exp = ExperimentParts[idx]; if (NE_Helper.IsPartTechAvailable(exp.getPartName())) { unlockedParts.Add(exp); } } /* MKW: Note we cannot cache this as the user may unlock new parts in-between calls to this function. */ return(new ReadOnlyCollection <Experiment>(unlockedParts)); }