Esempio n. 1
0
        public override void OnLoad(ConfigNode node)
        {
            if (!CompatibilityChecker.IsAllCompatible())
            {
                return;
            }
            this.node = node;
            LoadChutes();
            if (node.HasNode("SIZE"))
            {
                sizes = new List <SizeNode>(node.GetNodes("SIZE").Select(n => new SizeNode(n)));
                sizeLib.AddSizes(this.part.name, sizes);
            }

            //Top node original location
            if (this.part.findAttachNode("top") != null)
            {
                top = this.part.findAttachNode("top").originalPosition.y;
            }

            //Bottom node original location
            if (this.part.findAttachNode("bottom") != null)
            {
                bottom = this.part.findAttachNode("bottom").originalPosition.y;
            }

            //Original part size
            if (debut == 0)
            {
                debut = this.part.transform.GetChild(0).localScale.y;
            }
        }
Esempio n. 2
0
        public override void OnLoad(ConfigNode node)
        {
            if (!CompatibilityChecker.IsAllCompatible() || !this.part.Modules.Contains("RealChuteModule") || ((IntPtr.Size == 8) && (Environment.OSVersion.Platform == PlatformID.Win32NT)))
            {
                return;
            }
            this.node = node;
            LoadChutes();
            if (node.HasNode("SIZE"))
            {
                sizes = new List <SizeNode>(node.GetNodes("SIZE").Select(n => new SizeNode(n)));
                sizeLib.AddSizes(this.part.name, sizes);
            }

            //Top node original location
            if (this.part.findAttachNode("top") != null)
            {
                top = this.part.findAttachNode("top").originalPosition.y;
            }

            //Bottom node original location
            if (this.part.findAttachNode("bottom") != null)
            {
                bottom = this.part.findAttachNode("bottom").originalPosition.y;
            }

            //Original part size
            if (debut == 0)
            {
                debut = this.part.transform.GetChild(0).localScale.y;
            }
        }