Exemplo n.º 1
0
        // Function from file: datum_pipeline.dm
        public override dynamic Destroy(  )
        {
            Obj_Machinery_Atmospherics_Pipe       P = null;
            Obj_Machinery_Atmospherics_Components C = null;

            GlobalVars.SSair.networks.Remove(this);

            if (this.air != null && Lang13.Bool(this.air.volume))
            {
                this.temporarily_store_air();
            }

            foreach (dynamic _a in Lang13.Enumerate(this.members, typeof(Obj_Machinery_Atmospherics_Pipe)))
            {
                P = _a;

                P.parent = null;
            }

            foreach (dynamic _b in Lang13.Enumerate(this.other_atmosmch, typeof(Obj_Machinery_Atmospherics_Components)))
            {
                C = _b;

                C.nullifyPipenet(this);
            }
            return(base.Destroy());
        }
Exemplo n.º 2
0
        // Function from file: datum_pipeline.dm
        public void merge(Pipeline E = null)
        {
            Obj_Machinery_Atmospherics_Pipe       S = null;
            Obj_Machinery_Atmospherics_Components C = null;

            this.air.volume += E.air.volume ?? 0;
            this.members.Add(E.members);

            foreach (dynamic _a in Lang13.Enumerate(E.members, typeof(Obj_Machinery_Atmospherics_Pipe)))
            {
                S = _a;

                S.parent = this;
            }
            this.air.merge(E.air);

            foreach (dynamic _b in Lang13.Enumerate(E.other_atmosmch, typeof(Obj_Machinery_Atmospherics_Components)))
            {
                C = _b;

                C.replacePipenet(E, this);
            }
            this.other_atmosmch.Add(E.other_atmosmch);
            this.other_airs.Add(E.other_airs);
            E.members.Cut();
            E.other_atmosmch.Cut();
            GlobalFuncs.qdel(E);
            return;
        }
Exemplo n.º 3
0
        // Function from file: datum_pipeline.dm
        public void temporarily_store_air(  )
        {
            Obj_Machinery_Atmospherics_Pipe member = null;
            ByTable member_gases = null;
            dynamic id           = null;


            foreach (dynamic _b in Lang13.Enumerate(this.members, typeof(Obj_Machinery_Atmospherics_Pipe)))
            {
                member = _b;

                member.air_temporary        = new GasMixture();
                member.air_temporary.volume = member.volume;
                member.air_temporary.copy_from(this.air);
                member_gases = member.air_temporary.gases;

                foreach (dynamic _a in Lang13.Enumerate(member_gases))
                {
                    id = _a;

                    member_gases[id][1] *= member.volume / (this.air.volume ?? 0);
                }
                member.air_temporary.temperature = this.air.temperature;
            }
            return;
        }
Exemplo n.º 4
0
        // Function from file: datum_pipeline.dm
        public void addMember(Obj_Machinery_Atmospherics A = null, Obj_Machinery_Atmospherics N = null)
        {
            Obj_Machinery_Atmospherics P      = null;
            ByTable adjacent                  = null;
            Obj_Machinery_Atmospherics_Pipe I = null;
            Pipeline E = null;


            if (A is Obj_Machinery_Atmospherics_Pipe)
            {
                P = A;
                ((dynamic)P).parent = this;
                adjacent            = P.pipeline_expansion();

                foreach (dynamic _a in Lang13.Enumerate(adjacent, typeof(Obj_Machinery_Atmospherics_Pipe)))
                {
                    I = _a;


                    if (I.parent == this)
                    {
                        continue;
                    }
                    E = I.parent;
                    this.merge(E);
                }

                if (!(this.members.Find(P) != 0))
                {
                    this.members.Add(P);
                    this.air.volume += Convert.ToDouble(((dynamic)P).volume);
                }
            }
            else
            {
                A.setPipenet(this, N);
                this.addMachineryMember(A);
            }
            return;
        }