Inheritance: PartModule, IAirstreamShield
Esempio n. 1
0
        private void updateAirstreamShield()
        {
            SSTUAirstreamShield sass = part.GetComponent <SSTUAirstreamShield>();

            if (sass != null)
            {
                sass.updateShieldStatus();
            }
        }
Esempio n. 2
0
        private void updateShielding()
        {
            if (!shieldsParts)
            {
                return;
            }
            SSTUAirstreamShield shield = part.GetComponent <SSTUAirstreamShield>();

            if (shield != null)
            {
                shield.addShieldArea("ISDC-Shielding", currentTopDiameter * 0.5f, currentTopDiameter * 0.5f, currentHeight * 0.5f, -currentHeight * 0.5f, true, true);
            }
        }
Esempio n. 3
0
        private void updateShieldingStatus()
        {
            SSTUAirstreamShield shield = part.GetComponent <SSTUAirstreamShield>();

            if (shield != null)
            {
                if (currentlyEnabled)
                {
                    string name = fairingName + "" + part.Modules.IndexOf(this);
                    float  top = float.NegativeInfinity, bottom = float.PositiveInfinity, topRad = 0, botRad = 0;
                    bool   useTop = false, useBottom = false;
                    if (!string.IsNullOrEmpty(nodeName))
                    {
                        useTop    = nodeName == "top";
                        useBottom = nodeName == "bottom";
                    }
                    int         len = fairingParts.Length;
                    FairingData fp;
                    for (int i = 0; i < len; i++)
                    {
                        fp = fairingParts[i];
                        if (fp.topY > top)
                        {
                            top = fp.topY;
                        }
                        if (fp.bottomY < bottom)
                        {
                            bottom = fp.bottomY;
                        }
                        if (fp.topRadius > topRad)
                        {
                            topRad = fp.topRadius;
                        }
                        if (fp.bottomRadius > botRad)
                        {
                            botRad = fp.bottomRadius;
                        }
                    }
                    shield.addShieldArea(name, topRad, botRad, top, bottom, useTop, useBottom);
                }
                else
                {
                    shield.removeShieldArea(fairingName + "" + part.Modules.IndexOf(this));
                }
            }
        }
Esempio n. 4
0
        private void updateShieldStatus()
        {
            SSTUAirstreamShield shield = part.GetComponent <SSTUAirstreamShield>();

            if (shield != null)
            {
                string name = "InterstageFairingShield" + "" + part.Modules.IndexOf(this);
                if (state == InterstageFairingState.RETRACTED)
                {
                    float top       = currentHeight;;
                    float bottom    = 0f;
                    float topRad    = topDiameter * 0.5f;
                    float botRad    = bottomDiameter * 0.5f;
                    bool  useTop    = true;
                    bool  useBottom = false;
                    shield.addShieldArea(name, topRad, botRad, top, bottom, useTop, useBottom);
                }
                else
                {
                    shield.removeShieldArea(name);
                }
            }
        }
Esempio n. 5
0
 public void updateShieldStatus(Part p, List <Part> shieldedParts)
 {
     SSTUAirstreamShield.findShieldedPartsCylinder(p, shieldedParts, topY, bottomY, topRadius, bottomRadius);
 }