public override void OnStart(StartState state)
        {
            base.OnStart(state);
            if (HighLogic.LoadedSceneIsFlight == false)
            {
                return;
            }
            infoView = new InfoView();
            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)
            {
                harvestID = (HarvestTypes)harvestType;
                planetID  = this.part.vessel.mainBody.flightGlobalsIndex;
            }

            moduleSwitcher = this.part.FindModuleImplementing <WBIModuleSwitcher>();

            GameEvents.onCrewOnEva.Add(this.onCrewEVA);
            GameEvents.onCrewTransferred.Add(this.onCrewTransfer);
            GameEvents.onCrewBoardVessel.Add(this.onCrewBoardVessel);

            originalCriticalSuccess = criticalSuccess;
            setupModuleInfo();
        }
示例#2
0
        public override void OnStart(StartState state)
        {
            base.OnStart(state);
            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)
            {
                harvestID = (HarvestTypes)harvestType;
                planetID  = this.part.vessel.mainBody.flightGlobalsIndex;
            }

            moduleSwitcher = this.part.FindModuleImplementing <WBIModuleSwitcher>();
            setupModuleInfo();
        }
示例#3
0
        protected void loadValuesFromConfig()
        {
            string            value;
            WBIModuleSwitcher switcher = this.part.FindModuleImplementing <WBIModuleSwitcher>();

            ConfigNode[] moduleNodes = switcher.CurrentTemplate.GetNodes("MODULE");
            foreach (ConfigNode moduleNode in moduleNodes)
            {
                value = moduleNode.GetValue("name");
                if (value.Contains(this.ClassName))
                {
                    if (moduleNode.HasValue("planetEfficiencies"))
                    {
                        planetEfficiencies = moduleNode.GetValue("planetEfficiencies");
                        return;
                    }
                }
            }
        }
示例#4
0
        public override void OnStart(StartState state)
        {
            base.OnStart(state);
            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)
            {
                harvestID = (HarvestTypes)harvestType;
                planetID = this.part.vessel.mainBody.flightGlobalsIndex;
            }

            moduleSwitcher = this.part.FindModuleImplementing<WBIModuleSwitcher>();
            setupModuleInfo();
        }