public static List <ElectricEnginePropellant> GetPropellantsEngineForType(int type) { ConfigNode[] propellantlist = GameDatabase.Instance.GetConfigNodes("ELECTRIC_PROPELLANT"); List <ElectricEnginePropellant> propellant_list; if (propellantlist.Length == 0) { PluginHelper.showInstallationErrorMessage(); propellant_list = new List <ElectricEnginePropellant>(); } else { propellant_list = propellantlist.Select(prop => new ElectricEnginePropellant(prop)) .Where(eep => (eep.SupportedEngines & type) == type && PluginHelper.HasTechRequirmentOrEmpty(eep.TechRequirement)).ToList(); } return(propellant_list); }