Ejemplo n.º 1
0
        // Function from file: miscellaneous.dm
        public bool Extinguish(Mob_Living H = null)
        {
            if (!(H is Mob_Living_Carbon_Human))
            {
                return(false);
            }

            if (H.fire_stacks != 0)
            {
                if (this.extinguishes_left != 0)
                {
                    if (this.next_extinguish > Game13.time)
                    {
                        return(false);
                    }
                    this.next_extinguish = Game13.time + this.extinguish_cooldown;
                    this.extinguishes_left--;
                    H.visible_message("<span class='warning'>" + H + "'s suit automatically extinguishes them!</span>", "<span class='warning'>Your suit automatically extinguishes you.</span>");
                    H.ExtinguishMob();
                    GlobalFuncs.PoolOrNew(typeof(Obj_Effect_ParticleEffect_Water), GlobalFuncs.get_turf(H));
                }
            }
            return(false);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
        // Function from file: effects_smoke.dm
        public void Chilled(dynamic A = null)
        {
            dynamic            T       = null;
            GasMixture         G       = null;
            Obj_Effect_Hotspot H       = null;
            ByTable            G_gases = null;
            Obj_Machinery_Atmospherics_Components_Unary U = null;
            Mob_Living L    = null;
            Obj_Item   Item = null;


            if (A is Tile_Simulated)
            {
                T = A;

                if (Lang13.Bool(T.air))
                {
                    G = T.air;

                    if (Map13.GetDistance(T, this.location) < 2)
                    {
                        G.temperature = 2;
                    }
                    ((Tile)T).air_update_turf();

                    foreach (dynamic _a in Lang13.Enumerate(T, typeof(Obj_Effect_Hotspot)))
                    {
                        H = _a;

                        GlobalFuncs.qdel(H);
                        G_gases = G.gases;

                        if (Lang13.Bool(G_gases["plasma"]))
                        {
                            G.assert_gas("n2");
                            G_gases["n2"][1]    += G_gases["plasma"][1];
                            G_gases["plasma"][1] = 0;
                            G.garbage_collect();
                        }
                    }
                }

                foreach (dynamic _b in Lang13.Enumerate(T, typeof(Obj_Machinery_Atmospherics_Components_Unary)))
                {
                    U = _b;


                    if (!(U.welded == null) && !(U.welded == true))
                    {
                        U.welded = true;
                        U.update_icon();
                        U.visible_message("<span class='danger'>" + U + " was frozen shut!</span>");
                    }
                }

                foreach (dynamic _c in Lang13.Enumerate(T, typeof(Mob_Living)))
                {
                    L = _c;

                    L.ExtinguishMob();
                }

                foreach (dynamic _d in Lang13.Enumerate(T, typeof(Obj_Item)))
                {
                    Item = _d;

                    Item.extinguish();
                }
            }
            return;
        }