protected void setComplete()
        {
            WBIResearchContract contract = (WBIResearchContract)Root;

            contract.experimentCompleted = true;
            base.SetComplete();
        }
Beispiel #2
0
        protected void checkCompletion()
        {
            if (isCompleted)
            {
                return;
            }

            //If the experiment hasn't been completed then we can't be complete.
            WBIResearchContract contract = (WBIResearchContract)Root;

            if (contract.versionNumber >= WBIResearchContract.CurrentContractVersion)
            {
                if (contract.experimentCompleted == false)
                {
                    base.SetIncomplete();
                    return;
                }
            }

            //Check situation
            if (FlightGlobals.ActiveVessel.mainBody.flightGlobalsIndex == FlightGlobals.GetHomeBodyIndex() &&
                (FlightGlobals.ActiveVessel.situation == Vessel.Situations.LANDED || FlightGlobals.ActiveVessel.situation == Vessel.Situations.SPLASHED))
            {
                isCompleted = true;
                base.SetComplete();
            }
            else
            {
                base.SetIncomplete();
            }
        }
Beispiel #3
0
        protected void checkCompletion()
        {
            if (!HighLogic.LoadedSceneIsFlight)
            {
                return;
            }
            if (isCompleted)
            {
                return;
            }

            //If the experiment hasn't been completed then we can't be complete.
            if (Root is WBIResearchContract)
            {
                WBIResearchContract contract = (WBIResearchContract)Root;
                if (contract.versionNumber >= WBIResearchContract.CurrentContractVersion)
                {
                    if (contract.experimentCompleted == false)
                    {
                        base.SetIncomplete();
                        return;
                    }
                }
            }

            //Check situation
            checkSituation();
        }
Beispiel #4
0
        protected override void OnLoad(ConfigNode node)
        {
            experimentID = node.GetValue("experimentID");

            ConfigNode experimentNode = WBIResearchContract.GetExperimentNode(experimentID);

            loadFromDefinition(experimentNode);
        }
Beispiel #5
0
        public WBIExpConditionsParam(string experiment)
        {
            this.experimentID = experiment;

            ConfigNode experimentNode = WBIResearchContract.GetExperimentNode(experimentID);

            loadFromDefinition(experimentNode);
        }