Exemplo n.º 1
0
        // Function from file: zvent.dm
        public override int?process_atmos(  )
        {
            dynamic    new_z      = null;
            Tile       zturf_conn = null;
            dynamic    zvent_conn = null;
            Ent_Static myturf     = null;
            GasMixture conn_air   = null;
            GasMixture my_air     = null;


            if (this.loc is Tile_Simulated)
            {
                foreach (dynamic _a in Lang13.Enumerate(new ByTable(new object [] { -1, 1 })))
                {
                    new_z = _a;

                    zturf_conn = Map13.GetTile(this.x, this.y, ((int)(this.z + Convert.ToDouble(new_z))));

                    if (zturf_conn is Tile_Simulated)
                    {
                        zvent_conn = Lang13.FindIn(typeof(Obj_Machinery_Zvent), zturf_conn);

                        if (zvent_conn is Obj_Machinery_Zvent)
                        {
                            myturf   = this.loc;
                            conn_air = ((dynamic)zturf_conn).air;
                            my_air   = ((dynamic)myturf).air;

                            if (conn_air is GasMixture && my_air is GasMixture)
                            {
                                my_air.share(conn_air);
                                this.air_update_turf();
                            }
                        }
                    }
                }
            }
            return(null);
        }