Ejemplo n.º 1
0
        public void AddPipe(PipeData pipeData)
        {
            if (ISNewNet)
            {
                pipeData.OnNet    = this;
                this.mixAndVolume = pipeData.mixAndVolume.Clone();
                pipeData.mixAndVolume.Empty();
                this.Covering.Add(pipeData);
                this.NetUpdateProxy.OnNet = this;
                this.NetUpdateProxy.OnEnable();
                if (pipeData.CustomLogic == CustomLogic.CoolingPipe)
                {
                    this.pipeNetAction = new CoolingNet();
                    this.pipeNetAction.LiquidPipeNet = this;
                }

                ISNewNet = false;
            }
            else
            {
                if (pipeData.OnNet == null)
                {
                    pipeData.OnNet = this;
                    mixAndVolume.Add(pipeData.mixAndVolume);
                    Covering.Add(pipeData);
                }
                else
                {
                    if (this != pipeData.OnNet)
                    {
                        this.CombinePipeNets(pipeData.OnNet);
                    }
                }
            }
        }