public override void OnStart(StartState state)
        {
            base.OnStart(state);

            //Grab the survey module
            orbitalSurveyer = this.part.FindModuleImplementing <ModuleOrbitalSurveyor>();
            orbitalScanner  = this.part.FindModuleImplementing <ModuleOrbitalScanner>();

            //Verify that the planet is really unlocked
            //verifyPlanetUnlock();

            //Hide stock survey GUI
            if (orbitalSurveyer != null)
            {
                orbitalSurveyer.Events["PerformSurvey"].guiActive          = false;
                orbitalSurveyer.Events["PerformSurvey"].guiActiveUnfocused = false;
                orbitalSurveyer.Events["PerformSurvey"].guiActiveEditor    = false;
            }

            //Create swizzler
            swizzler            = new WBIResultsDialogSwizzler();
            swizzler.onTransmit = transmitData;

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

            //Now setup our own GUI
            botchedResultsMsg = this.part.partInfo.title + kSafeMode;
            SetupGUI();
        }
        public override void OnStart(StartState state)
        {
            base.OnStart(state);

            //Grab the survey module
            orbitalSurveyer = this.part.FindModuleImplementing<ModuleOrbitalSurveyor>();
            orbitalScanner = this.part.FindModuleImplementing<ModuleOrbitalScanner>();

            //Verify that the planet is really unlocked
            //verifyPlanetUnlock();

            //Hide stock survey GUI
            if (orbitalSurveyer != null)
            {
                orbitalSurveyer.Events["PerformSurvey"].guiActive = false;
                orbitalSurveyer.Events["PerformSurvey"].guiActiveUnfocused = false;
                orbitalSurveyer.Events["PerformSurvey"].guiActiveEditor = false;
            }

            //Create swizzler
            swizzler = new WBIResultsDialogSwizzler();
            swizzler.onTransmit = transmitData;

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

            //Now setup our own GUI
            botchedResultsMsg = kSafeMode;
            SetupGUI();
        }
Exemple #3
0
        public override void OnStart(StartState state)
        {
            base.OnStart(state);
            SetGuiVisible(false);
            showResults = false;

            resourceList = ResourceMap.Instance.GetResourceItemList(HarvestTypes.Planetary, this.part.vessel.mainBody);

            gps          = this.part.FindModuleImplementing <ModuleGPS>();
            biomeScanner = this.part.FindModuleImplementing <ModuleBiomeScanner>();
            hideStockGUI();

            //Grab the seismometer (if any)
            foreach (PartModule mod in this.part.Modules)
            {
                if (mod.moduleName == "Seismometer")
                {
                    impactSeismometer = mod;
                    impactSensor      = (IScienceDataContainer)impactSeismometer;
                    break;
                }
            }

            //Create swizzler
            swizzler            = new WBIResultsDialogSwizzler();
            swizzler.onTransmit = transmitData;

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

            if (impactSensor != null)
            {
                ScienceData[] impactData = impactSensor.GetData();

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

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

            //Elapsed time for current experiment
            if (ModuleIsActive())
            {
                //Get the new elapsed time.
                int elapsedTimeIndex = (int)currentExperiment;
                elapsedTime = elapsedTimes[elapsedTimeIndex];

                //Reset the research start time.
                cycleStartTime = Planetarium.GetUniversalTime() - elapsedTime;
            }

            CBAttributeMapSO.MapAttribute biome = Utils.GetCurrentBiome(this.part.vessel);
            biomeName = biome.name;

            if (this.part.vessel.situation == Vessel.Situations.LANDED || this.part.vessel.situation == Vessel.Situations.SPLASHED || this.part.vessel.situation == Vessel.Situations.PRELAUNCH)
            {
                planetID    = this.part.vessel.mainBody.flightGlobalsIndex;
                harvestType = (HarvestTypes)harvestID;
            }
        }
Exemple #4
0
        public override void OnStart(StartState state)
        {
            base.OnStart(state);
            SetGuiVisible(false);
            showResults = false;

            resourceList = ResourceMap.Instance.GetResourceItemList(HarvestTypes.Planetary, this.part.vessel.mainBody);

            gps = this.part.FindModuleImplementing<ModuleGPS>();
            biomeScanner = this.part.FindModuleImplementing<ModuleBiomeScanner>();
            hideStockGUI();

            //Grab the seismometer (if any)
            foreach (PartModule mod in this.part.Modules)
                if (mod.moduleName == "Seismometer")
                {
                    impactSeismometer = mod;
                    impactSensor = (IScienceDataContainer)impactSeismometer;
                    break;
                }

            //Create swizzler
            swizzler = new WBIResultsDialogSwizzler();
            swizzler.onTransmit = transmitData;

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

            if (impactSensor != null)
            {
                ScienceData[] impactData = impactSensor.GetData();

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

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

            //Elapsed time for current experiment
            if (ModuleIsActive())
            {
                //Get the new elapsed time.
                int elapsedTimeIndex = (int)currentExperiment;
                elapsedTime = elapsedTimes[elapsedTimeIndex];

                //Reset the research start time.
                cycleStartTime = Planetarium.GetUniversalTime() - elapsedTime;
            }

            CBAttributeMapSO.MapAttribute biome = Utils.GetCurrentBiome(this.part.vessel);
            biomeName = biome.name;

            if (this.part.vessel.situation == Vessel.Situations.LANDED || this.part.vessel.situation == Vessel.Situations.SPLASHED || this.part.vessel.situation == Vessel.Situations.PRELAUNCH)
            {
                planetID = this.part.vessel.mainBody.flightGlobalsIndex;
                harvestType = (HarvestTypes)harvestID;
            }
        }
Exemple #5
0
        public override void OnStart(StartState state)
        {
            base.OnStart(state);
            SetGuiVisible(false);
            showResults = false;

            resourceList = ResourceMap.Instance.GetResourceItemList(HarvestTypes.Planetary, this.part.vessel.mainBody);

            //Create swizzler
            swizzler = new WBIResultsDialogSwizzler();
            swizzler.onTransmit = transmitData;

            //Elapsed time for current experiment
            if (ModuleIsActive())
            {
                //Get the new elapsed time.
                int elapsedTimeIndex = (int)currentExperiment;
                elapsedTime = elapsedTimes[elapsedTimeIndex];

                //Reset the research start time.
                cycleStartTime = Planetarium.GetUniversalTime() - elapsedTime;
            }

            CBAttributeMapSO.MapAttribute biome = Utils.GetCurrentBiome(this.part.vessel);
            biomeName = biome.name;

            if (this.part.vessel.situation == Vessel.Situations.LANDED || this.part.vessel.situation == Vessel.Situations.SPLASHED || this.part.vessel.situation == Vessel.Situations.PRELAUNCH)
            {
                planetID = this.part.vessel.mainBody.flightGlobalsIndex;
                harvestType = (HarvestTypes)harvestID;
            }
        }