예제 #1
0
        protected override void setupPartModules()
        {
            base.setupPartModules();

            //Get the experiment lab
            experimentLab = this.part.FindModuleImplementing <WBIExperimentLab>();
            if (experimentLab == null)
            {
                return;
            }
            experimentLab.unavailableMessage = kUnavailableMessage;

            //Setup the science container
            if (scienceContainer == null)
            {
                scienceContainer = this.part.FindModuleImplementing <ModuleScienceContainer>();
                scienceContainer.Events["ReviewDataEvent"].guiActiveUnfocused = false;
                scienceContainer.Events["ReviewDataEvent"].guiActive          = false;

                //Terrain uplink
                terrainUplinkView.part             = this.part;
                terrainUplinkView.scienceContainer = scienceContainer;
            }

            //Kerbnet access
            kerbNetAccess = this.part.FindModuleImplementing <ModuleKerbNetAccess>();
            if (kerbNetAccess != null)
            {
            }
        }
예제 #2
0
        protected override void setupPartModules()
        {
            base.setupPartModules();

            //Setup the science container
            if (scienceContainer == null)
            {
                scienceContainer = this.part.FindModuleImplementing <ModuleScienceContainer>();
                scienceContainer.Events["ReviewDataEvent"].guiActiveUnfocused = false;
                scienceContainer.Events["ReviewDataEvent"].guiActive          = false;

                //Terrain uplink
                terrainUplinkView.part             = this.part;
                terrainUplinkView.scienceContainer = scienceContainer;
            }

            //Kerbnet access
            kerbNetAccess = this.part.FindModuleImplementing <ModuleKerbNetAccess>();
            if (kerbNetAccess != null)
            {
            }

            //Grab the seismometer (if any)
            foreach (PartModule mod in this.part.Modules)
            {
                if (mod.moduleName == "Seismometer")
                {
                    impactSeismometer = mod;
                    impactSensor      = (IScienceDataContainer)impactSeismometer;
                    ScienceData[] impactData = impactSensor.GetData();

                    foreach (ScienceData data in impactData)
                    {
                        scienceContainer.AddData(data);
                    }
                    foreach (ScienceData doomed in impactData)
                    {
                        impactSensor.DumpData(doomed);
                    }
                    break;
                }
            }
        }