private static LabEquipment getLabEquipment(Part part, EquipmentRacks type) { LabEquipmentModule lem = part.GetComponent <LabEquipmentModule>(); float mass = part.partInfo.partPrefab.mass; float cost = part.partInfo.cost; return(new LabEquipment(lem.abbreviation, lem.eqName, type, mass, cost, lem.productPerHour, lem.product, lem.reactantPerProduct, lem.reactant)); }
public static List <LabEquipment> getAvailableRacks() { List <LabEquipment> list = new List <LabEquipment>(); foreach (KeyValuePair <EquipmentRacks, string> p in racks) { AvailablePart part = PartLoader.getPartInfoByName(p.Value); if (part != null) { Part pPf = part.partPrefab; LabEquipmentModule lem = pPf.GetComponent <LabEquipmentModule>(); if (ResearchAndDevelopment.PartTechAvailable(part)) { list.Add(getLabEquipment(part.partPrefab, p.Key)); } } } return(list); }
private static LabEquipment getLabEquipment(Part part, EquipmentRacks type) { LabEquipmentModule lem = part.GetComponent <LabEquipmentModule>(); return(new LabEquipment(lem.abbreviation, lem.eqName, type, part.mass, lem.productPerHour, lem.product, lem.reactantPerProduct, lem.reactant)); }