public static double GetPartVolume(this Part p) { //if (partVolumesCache.ContainsKey(p.name)) // return partVolumesCache[p.name]; //Core.Log("Can't find volume of " + p.name + " in the cache (" + partVolumesCache.Count + " records)."); return(PartUtils.CalculatePartVolume(p)); //double v = p.FindModulesImplementing<ModuleEquipmentItem>().Sum(mod => mod.Volume); //return v > 0 ? v : PartUtils.CalculatePartVolume(p); }
public static double GetPartVolume(this AvailablePart ap) => PartUtils.CalculatePartVolume(ap);