private void udfs(out string s, Fuel[] fuels) { // DEBUG //ScreenMessages.PostScreenMessage("a: " + fuels.Length.ToString(), 1, ScreenMessageStyle.LOWER_CENTER, true); if (fuels.Length == 0) { s = "None"; return; } s = ""; bool plus = false; foreach (Fuel fuel in fuels) { if (plus) { s += " + "; } // add code to verify found exists to prevent nullref plus = true; resourceLa abr = lastResource.Find(x => x.resourceID == fuel.resourceID); s += PartResourceLibrary.Instance.GetDefinition(fuel.resourceID).name; // DEBUG //ScreenMessages.PostScreenMessage(s, 1, ScreenMessageStyle.UPPER_CENTER, true); } }
private void updateFS(out string s, Fuel[] fuels) { if (fuels.Length == 0) { s = "None"; return; } s = ""; bool plus = false; foreach (Fuel fuel in fuels) { if (plus) s += " + "; // add code to verify found exists to prevent nullref plus = true; resourceLa abr = lastResource.Find(x => x.resourceID == fuel.resourceID); s += PartResourceLibrary.Instance.GetDefinition(fuel.resourceID).name; } }