예제 #1
0
        public virtual void f_flush(  )
        {
            Obj_Structure_Disposalholder H = null;

            this.flushing = true;
            this.flushAnimation();
            Task13.Sleep(10);

            if (this.last_sound < Game13.time + 1)
            {
                GlobalFuncs.playsound(this, "sound/machines/disposalflush.ogg", 50, 0, 0);
                this.last_sound = Game13.time;
            }
            Task13.Sleep(5);

            if (Lang13.Bool(this.gc_destroyed))
            {
                return;
            }
            H = new Obj_Structure_Disposalholder();
            this.newHolderDestination(H);
            H.init(this);
            this.air_contents = new GasMixture();
            H.start(this);
            this.flushing = false;
            this.flush    = 0;
            return;
        }
예제 #2
0
        // Function from file: disposal-unit.dm
        public void expel(Obj_Structure_Disposalholder H = null)
        {
            dynamic     T      = null;
            Tile        target = null;
            Ent_Dynamic AM     = null;

            T = GlobalFuncs.get_turf(this);
            GlobalFuncs.playsound(this, "sound/machines/hiss.ogg", 50, 0, 0);

            if (H != null)
            {
                foreach (dynamic _a in Lang13.Enumerate(H, typeof(Ent_Dynamic)))
                {
                    AM = _a;

                    target = GlobalFuncs.get_offset_target_turf(this.loc, Rand13.Int(5) - Rand13.Int(5), Rand13.Int(5) - Rand13.Int(5));
                    AM.forceMove(T);
                    AM.pipe_eject(0);
                    AM.throw_at_fast(target, 5, 1);
                }
                H.vent_gas(this.loc);
                GlobalFuncs.qdel(H);
            }
            return;
        }
예제 #3
0
        // Function from file: disposal-structures.dm
        public void expel(Obj_Structure_Disposalholder H = null)
        {
            dynamic     T  = null;
            Ent_Dynamic AM = null;

            T = GlobalFuncs.get_turf(this);
            Icon13.Flick("outlet-open", this);

            if (this.start_eject + 30 < Game13.time)
            {
                this.start_eject = Game13.time;
                GlobalFuncs.playsound(this, "sound/machines/warning-buzzer.ogg", 50, 0, 0);
                Task13.Sleep(20);
                GlobalFuncs.playsound(this, "sound/machines/hiss.ogg", 50, 0, 0);
            }
            else
            {
                Task13.Sleep(20);
            }

            if (H != null)
            {
                foreach (dynamic _a in Lang13.Enumerate(H, typeof(Ent_Dynamic)))
                {
                    AM = _a;

                    AM.forceMove(T);
                    AM.pipe_eject(this.dir);
                    AM.throw_at_fast(this.target, this.eject_range, 1);
                }
                H.vent_gas(T);
                GlobalFuncs.qdel(H);
            }
            return;
        }
예제 #4
0
        // Function from file: disposal-structures.dm
        public override Obj_Structure_Disposalpipe transfer(Obj_Structure_Disposalholder H = null)
        {
            double?nextdir = null;

            nextdir = this.nextdir(H.dir, H.tomail);
            return(this.transfer_to_dir(H, nextdir));
        }
예제 #5
0
        // Function from file: disposal-structures.dm
        public virtual Obj_Structure_Disposalpipe transfer(Obj_Structure_Disposalholder H = null)
        {
            double?nextdir = null;

            nextdir = this.nextdir(H.dir);
            return(this.transfer_to_dir(H, nextdir));
        }
예제 #6
0
        // Function from file: disposal-structures.dm
        public Obj_Structure_Disposalpipe transfer_to_dir(Obj_Structure_Disposalholder H = null, double?nextdir = null)
        {
            Tile T = null;
            Obj_Structure_Disposalpipe P = null;
            dynamic H2 = null;

            H.dir = ((int)(nextdir ?? 0));
            T     = H.nextloc();
            P     = H.findpipe(T);

            if (P != null)
            {
                H2 = Lang13.FindIn(typeof(Obj_Structure_Disposalholder), P);

                if (Lang13.Bool(H2) && !Lang13.Bool(H2.active))
                {
                    H.merge(H2);
                }
                H.loc = P;
                return(P);
            }
            else
            {
                H.loc = GlobalFuncs.get_turf(this);
                return(null);
            }
        }
예제 #7
0
        // Function from file: disposal-structures.dm
        public override Obj_Structure_Disposalpipe transfer(Obj_Structure_Disposalholder H = null)
        {
            dynamic O = null;
            dynamic D = null;


            if (H.dir == GlobalVars.DOWN)
            {
                return(base.transfer(H));
            }

            if (Lang13.Bool(this.linked))
            {
                O = this.linked;

                if (O is Obj_Structure_Disposaloutlet && H != null)
                {
                    ((Obj_Structure_Disposaloutlet)O).expel(H);
                }
                else
                {
                    D = this.linked;

                    if (H != null)
                    {
                        D.expel(H);
                    }
                }
            }
            else if (H != null)
            {
                this.expel(H, GlobalFuncs.get_turf(this), 0);
            }
            return(null);
        }
예제 #8
0
        // Function from file: disposal-unit.dm
        public virtual void newHolderDestination(Obj_Structure_Disposalholder H = null)
        {
            Obj_Item_SmallDelivery O = null;


            foreach (dynamic _a in Lang13.Enumerate(this, typeof(Obj_Item_SmallDelivery)))
            {
                O = _a;

                H.tomail = 1;
                return;
            }
            return;
        }
예제 #9
0
 // Function from file: disposal-unit.dm
 public override void newHolderDestination(Obj_Structure_Disposalholder H = null)
 {
     H.destinationTag = 1;
     return;
 }