Пример #1
0
        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();
        }