Exemple #1
0
 public override void OnStart(PartModule.StartState state)
 {
     base.OnStart(state);
     if (part.FindModulesImplementing <DMModuleScienceAnimate>().Count > 0)
     {
         primaryModule = part.FindModulesImplementing <DMModuleScienceAnimate>().First();
     }
 }
Exemple #2
0
 private void setup()
 {
     Events["deployEvent"].guiActive               = showStartEvent;
     Events["retractEvent"].guiActive              = showEndEvent;
     Events["toggleEvent"].guiActive               = showToggleEvent;
     Events["deployEvent"].guiName                 = startEventGUIName;
     Events["retractEvent"].guiName                = endEventGUIName;
     Events["toggleEvent"].guiName                 = toggleEventGUIName;
     Events["CollectDataExternalEvent"].guiName    = collectActionName;
     Events["ResetExperimentExternal"].guiName     = resetActionName;
     Events["ResetExperiment"].guiName             = resetActionName;
     Events["DeployExperiment"].guiName            = experimentActionName;
     Events["DeployExperiment"].guiActiveUnfocused = externalDeploy;
     Events["DeployExperiment"].externalToEVAOnly  = externalDeploy;
     Events["DeployExperiment"].unfocusedRange     = interactionRange;
     Actions["deployAction"].guiName               = startEventGUIName;
     Actions["retractAction"].guiName              = endEventGUIName;
     Actions["toggleAction"].guiName               = toggleEventGUIName;
     Actions["DeployAction"].guiName               = experimentActionName;
     if (!primary)
     {
         primaryList = this.part.FindModulesImplementing <DMModuleScienceAnimate>();
         if (primaryList.Count > 0)
         {
             foreach (DMModuleScienceAnimate DMS in primaryList)
             {
                 if (DMS.primary)
                 {
                     primaryModule = DMS;
                 }
             }
         }
     }
     if (USStock)
     {
         enviroList = this.part.FindModulesImplementing <DMEnviroSensor>();
     }
     if (waitForAnimationTime == -1 && animSpeed != 0)
     {
         waitForAnimationTime = anim[animationName].length / animSpeed;
     }
     if (experimentID != null)
     {
         scienceExp = ResearchAndDevelopment.GetExperiment(experimentID);
         //if (scienceExp != null && DMUtils.whiteListed) {
         //	scienceExp.situationMask = (uint)sitMask;
         //	scienceExp.biomeMask = (uint)bioMask;
         //}
     }
     if (FlightGlobals.Bodies[16].bodyName != "Eeloo")
     {
         FlightGlobals.Bodies[16].bodyName = bodyNameFixed;
     }
     labDataBoost = xmitDataScalar / 2;
 }
 private void setup()
 {
     Events["deployEvent"].guiActive = showStartEvent;
     Events["retractEvent"].guiActive = showEndEvent;
     Events["toggleEvent"].guiActive = showToggleEvent;
     Events["deployEvent"].guiName = startEventGUIName;
     Events["retractEvent"].guiName = endEventGUIName;
     Events["toggleEvent"].guiName = toggleEventGUIName;
     Events["CollectDataExternalEvent"].guiName = collectActionName;
     Events["ResetExperimentExternal"].guiName = resetActionName;
     Events["ResetExperiment"].guiName = resetActionName;
     Events["DeployExperiment"].guiName = experimentActionName;
     Events["DeployExperiment"].guiActiveUnfocused = externalDeploy;
     Events["DeployExperiment"].externalToEVAOnly = externalDeploy;
     Events["DeployExperiment"].unfocusedRange = interactionRange;
     Actions["deployAction"].guiName = startEventGUIName;
     Actions["retractAction"].guiName = endEventGUIName;
     Actions["toggleAction"].guiName = toggleEventGUIName;
     Actions["DeployAction"].guiName = experimentActionName;
     if (!primary)
     {
         primaryList = this.part.FindModulesImplementing<DMModuleScienceAnimate>();
         if (primaryList.Count > 0)
         {
             foreach (DMModuleScienceAnimate DMS in primaryList)
                 if (DMS.primary) primaryModule = DMS;
         }
     }
     if (USStock)
         enviroList = this.part.FindModulesImplementing<DMEnviroSensor>();
     if (waitForAnimationTime == -1 && animSpeed != 0)
         waitForAnimationTime = anim[animationName].length / animSpeed;
     if (experimentID != null)
     {
         scienceExp = ResearchAndDevelopment.GetExperiment(experimentID);
     }
     if (FlightGlobals.Bodies[16].bodyName != "Eeloo")
         FlightGlobals.Bodies[16].bodyName = bodyNameFixed;
     labDataBoost = xmitDataScalar / 2;
 }
Exemple #4
0
        /// <summary>
        /// For external use to determine if a module can conduct science
        /// </summary>
        /// <param name="MSE">The base ModuleScienceExperiment instance</param>
        /// <returns>True if the experiment can be conducted under current conditions</returns>
        public static bool conduct(ModuleScienceExperiment MSE)
        {
            DMModuleScienceAnimate DMMod = (DMModuleScienceAnimate)MSE;

            return(DMMod.canConduct());
        }
 public override void OnStart(PartModule.StartState state)
 {
     base.OnStart(state);
     if (part.FindModulesImplementing<DMModuleScienceAnimate>().Count > 0)
         primaryModule = part.FindModulesImplementing<DMModuleScienceAnimate>().First();
 }