void LoadMixtures() { //Load BiProps ConfigNode[] biPropNodes = GameDatabase.Instance.GetConfigNodes("ProcEngBiPropMixture"); biPropConfigs = new List <BiPropellantConfig>(); for (int i = 0; i < biPropNodes.Length; ++i) { ConfigNode node = biPropNodes[i]; if (BiPropellantConfig.CheckConfigResourcesExist(node)) { biPropConfigs.Add(new BiPropellantConfig(node)); } } ConfigNode[] propellantAuxProperties = GameDatabase.Instance.GetConfigNodes("ProcEngPropAuxProperties"); auxPropellantProperties = new Dictionary <PartResourceDefinition, PropellantProperties>(); for (int i = 0; i < propellantAuxProperties.Length; ++i) { ConfigNode node = propellantAuxProperties[i]; PartResourceDefinition res = null; if (PropellantProperties.CheckConfigResourcesExist(node, out res)) { PropellantProperties properties = new PropellantProperties(node, res); auxPropellantProperties.Add(res, properties); } } }
public static BiPropellantConfig GetBiPropellantConfig(string mixtureTitle) { List <BiPropellantConfig> biPropConfigs = BiPropConfigs; for (int i = 0; i < biPropConfigs.Count; ++i) { BiPropellantConfig config = biPropConfigs[i]; if (config.MixtureTitle == mixtureTitle) { return(config); } } Debug.LogError("[ProcEngines] Error; propellant mixture " + mixtureTitle + " could not be found"); return(null); }