示例#1
0
        //NOTE: This is an approximation. This won't properly take into account for resources and tweakscale! DO NOT USE IF YOU CARE 100% ABOUT THE MASS
        public double GetTotalMass()
        {
            if (TotalMass != 0)
            {
                return(TotalMass);
            }
            double mass = 0;

            foreach (ConfigNode p in this.ExtractedPartNodes)
            {
                float n1, n2;
                mass += ShipConstruction.GetPartTotalMass(p, KCT_Utilities.GetAvailablePartByName(KCT_Utilities.PartNameFromNode(p)), out n1, out n2);
            }
            return(mass);
        }