コード例 #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
ファイル: WBIGreenhouse.cs プロジェクト: Bear67/Pathfinder
        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();
        }