示例#1
0
        // Function from file: disposal-structures.dm
        public void init(Obj_Machinery_Disposal D = null)
        {
            Mob_Living  M  = null;
            Obj         O  = null;
            Mob_Living  M2 = null;
            Ent_Dynamic AM = null;
            Ent_Dynamic T  = null;
            Ent_Dynamic T2 = null;

            this.gas = D.air_contents;

            foreach (dynamic _a in Lang13.Enumerate(D, typeof(Mob_Living)))
            {
                M = _a;


                if (M.client != null)
                {
                    M.reset_perspective(this);
                }
                this.hasmob = true;
            }

            foreach (dynamic _c in Lang13.Enumerate(D, typeof(Obj)))
            {
                O = _c;


                if (O.contents != null)
                {
                    foreach (dynamic _b in Lang13.Enumerate(O.contents, typeof(Mob_Living)))
                    {
                        M2 = _b;

                        this.hasmob = true;
                    }
                }
            }

            foreach (dynamic _d in Lang13.Enumerate(D, typeof(Ent_Dynamic)))
            {
                AM = _d;

                AM.loc = this;

                if (AM is Obj_Structure_BigDelivery && !this.hasmob)
                {
                    T = AM;
                    this.destinationTag = Lang13.DoubleNullable(((dynamic)T).sortTag);
                }

                if (AM is Obj_Item_SmallDelivery && !this.hasmob)
                {
                    T2 = AM;
                    this.destinationTag = Lang13.DoubleNullable(((dynamic)T2).sortTag);
                }
            }
            return;
        }
示例#2
0
        // Function from file: statue.dm
        public override void dump_contents(  )
        {
            Ent_Static S  = null;
            dynamic    M  = null;
            Obj        O  = null;
            Mob_Living M2 = null;


            if (this.loc is Mob_Living_SimpleAnimal_Hostile_Statue)
            {
                S        = this.loc;
                this.loc = S.loc;

                if (Lang13.Bool(((dynamic)S).mind))
                {
                    foreach (dynamic _a in Lang13.Enumerate(this.contents))
                    {
                        M = _a;

                        ((Mind)((dynamic)S).mind).transfer_to(M);
                        M.WriteMsg("As the animating magic wears off you feel yourself coming back to your senses. You are yourself again!");
                        break;
                    }
                }
                GlobalFuncs.qdel(S);
            }

            foreach (dynamic _b in Lang13.Enumerate(this, typeof(Obj)))
            {
                O = _b;

                O.loc = this.loc;
            }

            foreach (dynamic _c in Lang13.Enumerate(this, typeof(Mob_Living)))
            {
                M2 = _c;

                M2.loc           = this.loc;
                M2.disabilities -= 2;
                M2.take_overall_damage(M2.health - this.health - 100, 0);
                M2.faction -= "mimic";
                M2.reset_perspective(null);
            }
            return;
        }
示例#3
0
        // Function from file: machinery.dm
        public dynamic dropContents(  )
        {
            dynamic _default = null;

            dynamic    T = null;
            Mob_Living L = null;

            T = GlobalFuncs.get_turf(this);

            foreach (dynamic _a in Lang13.Enumerate(this, typeof(Mob_Living)))
            {
                L = _a;

                L.loc = T;
                L.reset_perspective(null);
                L.update_canmove();
                _default += L;
            }
            T.contents.Add(this.contents);
            this.occupant = null;
            return(_default);
        }
示例#4
0
        // Function from file: ethereal_jaunt.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            Mob_Living target = null;
            dynamic    mobloc = null;
            Obj_Effect_Dummy_SpellJaunt holder    = null;
            Dynamic_Overlay             animation = null;
            dynamic direction = null;
            Tile    T         = null;

            GlobalFuncs.playsound(GlobalFuncs.get_turf(thearea), "sound/magic/Ethereal_Enter.ogg", 50, 1, -1);

            foreach (dynamic _b in Lang13.Enumerate(targets, typeof(Mob_Living)))
            {
                target = _b;

                target.notransform = 1;
                Task13.Schedule(0, (Task13.Closure)(() => {
                    mobloc             = GlobalFuncs.get_turf(target.loc);
                    holder             = new Obj_Effect_Dummy_SpellJaunt(mobloc);
                    animation          = new Dynamic_Overlay(mobloc);
                    animation.name     = "water";
                    animation.density  = false;
                    animation.anchored = 1;
                    animation.icon     = "icons/mob/mob.dmi";
                    animation.layer    = 5;
                    animation.master   = holder;
                    target.ExtinguishMob();

                    if (target.buckled != null)
                    {
                        target.buckled.unbuckle_mob();
                    }

                    if (target.pulledby != null)
                    {
                        target.pulledby.__CallVerb("Stop Pulling");
                    }
                    target.__CallVerb("Stop Pulling");

                    if (Lang13.Bool(target.buckled_mob))
                    {
                        target.unbuckle_mob(true);
                    }
                    this.jaunt_disappear(animation, target);
                    target.loc = holder;
                    target.reset_perspective(holder);
                    target.notransform = 0;
                    this.jaunt_steam(mobloc);
                    Task13.Sleep(this.jaunt_duration);

                    if (target.loc != holder)
                    {
                        GlobalFuncs.qdel(holder);
                        return;
                    }
                    mobloc        = GlobalFuncs.get_turf(target.loc);
                    animation.loc = mobloc;
                    this.jaunt_steam(mobloc);
                    target.canmove     = false;
                    holder.reappearing = true;
                    GlobalFuncs.playsound(GlobalFuncs.get_turf(thearea), "sound/magic/Ethereal_Exit.ogg", 50, 1, -1);
                    Task13.Sleep(20);

                    if (!Lang13.Bool(GlobalFuncs.qdeleted(target)))
                    {
                        this.jaunt_reappear(animation, target);
                    }
                    Task13.Sleep(5);
                    GlobalFuncs.qdel(animation);
                    GlobalFuncs.qdel(holder);

                    if (!Lang13.Bool(GlobalFuncs.qdeleted(target)))
                    {
                        if (mobloc.density)
                        {
                            foreach (dynamic _a in Lang13.Enumerate(new ByTable(new object [] { 1, 2, 4, 8, 5, 6, 9, 10 })))
                            {
                                direction = _a;

                                T = Map13.GetStep(mobloc, Convert.ToInt32(direction));

                                if (T != null)
                                {
                                    if (target.Move(T))
                                    {
                                        break;
                                    }
                                }
                            }
                        }
                        target.canmove = true;
                    }
                    return;
                }));
            }
            return(false);
        }