Exemple #1
0
 /// <summary>
 /// Checks to see if a part module is supported
 /// </summary>
 /// <param name="moduleName">The partModule name to check for.</param>
 /// <param name="resourceType">The type of ResourcesSupported to support</param>
 public static bool IsSupportedPartModule(string moduleName, ResourcesSupported resourceType)
 {
     if (Settings.SupportedModules(resourceType).Contains(moduleName))
     {
         return(true);
     }
     return(false);
 }
Exemple #2
0
 /// <summary>
 /// Gets the handler module data for a part module name
 /// </summary>
 /// <param name="moduleName">The partModule name to check for.</param>
 /// <param name="resourceType">The type of ResourcesSupported to support</param>
 public static HandlerModuleData GetPartModuleData(string moduleName, ResourcesSupported resourceType)
 {
     for (int i = 0; i < HandlerPartModuleData.Count; i++)
     {
         if (HandlerPartModuleData[i].resourceType == resourceType && HandlerPartModuleData[i].handledModule == moduleName)
         {
             return(HandlerPartModuleData[i]);
         }
     }
     return(null);
 }
Exemple #3
0
        /// <summary>
        /// Gets a list of supported part modules
        /// </summary>
        /// <param name="resourceType">The type of ResourcesSupported to support</param>
        public static List <String> SupportedModules(ResourcesSupported resourceType)
        {
            List <string> supportedModules = new List <string>();

            for (int i = 0; i < HandlerPartModuleData.Count; i++)
            {
                if (HandlerPartModuleData[i].resourceType == resourceType)
                {
                    supportedModules.Add(HandlerPartModuleData[i].handledModule);
                }
            }
            return(supportedModules);
        }