public void ConductExperiments() { if (FlightGlobals.ActiveVessel == null) { return; } if (!FlightGlobals.ActiveVessel.isEVA) { ScreenMessages.PostScreenMessage("Must be on EVA to activate this experiment", 5f, ScreenMessageStyle.UPPER_CENTER); return; } int l = experiments.Count; for (int i = 0; i < l; i++) { ModuleSEPScienceExperiment experiment = experiments[i]; if (experiment == null) { continue; } experiment.DeployExperiment(); } }
public void ConductExperiments() { if (FlightGlobals.ActiveVessel == null) { return; } if (!FlightGlobals.ActiveVessel.isEVA) { ScreenMessages.PostScreenMessage(Localizer.Format("#LOC_SurfaceExperimentPack_ModuleSEPScienceExperiment_EVAWarning"), 5f, ScreenMessageStyle.UPPER_CENTER); return; } int l = experiments.Count; for (int i = 0; i < l; i++) { ModuleSEPScienceExperiment experiment = experiments[i]; if (experiment == null) { continue; } experiment.DeployExperiment(); } }
public void ConductExperiments() { if (FlightGlobals.ActiveVessel == null) { return; } if (!FlightGlobals.ActiveVessel.isEVA) { ScreenMessages.PostScreenMessage("Must be one EVA to activate this experiment", 5f, ScreenMessageStyle.UPPER_CENTER); return; } ProtoCrewMember crew = FlightGlobals.ActiveVessel.GetVesselCrew().FirstOrDefault(); if (crew == null) { return; } if (crew.experienceTrait.TypeName != "Scientist") { ScreenMessages.PostScreenMessage("Kerbal must be scientist", 5f, ScreenMessageStyle.UPPER_CENTER); return; } int l = experiments.Count; for (int i = 0; i < l; i++) { ModuleSEPScienceExperiment experiment = experiments[i]; if (experiment == null) { continue; } experiment.DeployExperiment(); } }