public static string Print(this CollectScienceCustom.RecoveryMethod recoveryMethod)
 {
     if (recoveryMethod == CollectScienceCustom.RecoveryMethod.RecoverOrTransmit)
     {
         return("Recover or transmit");
     }
     return(recoveryMethod.ToString());
 }
Exemplo n.º 2
0
        public override bool Load(ConfigNode configNode)
        {
            // Load base class
            bool valid = base.Load(configNode);

            valid &= ConfigNodeUtil.ParseValue <string>(configNode, "biome", x => biome = x, this, "");
            valid &= ConfigNodeUtil.ParseValue <ExperimentSituations?>(configNode, "situation", x => situation = x, this, (ExperimentSituations?)null);
            valid &= ConfigNodeUtil.ParseValue <BodyLocation?>(configNode, "location", x => location = x, this, (BodyLocation?)null);
            valid &= ConfigNodeUtil.ParseValue <string>(configNode, "experiment", x => experiment = x, this, "", ValidateExperiment);
            valid &= ConfigNodeUtil.ParseValue <CollectScienceCustom.RecoveryMethod>(configNode, "recoveryMethod", x => recoveryMethod = x, this, CollectScienceCustom.RecoveryMethod.None);

            return(valid);
        }