예제 #1
0
 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);
 }
예제 #2
0
 public static double GetPartVolume(this AvailablePart ap) => PartUtils.CalculatePartVolume(ap);