Ejemplo n.º 1
0
        // Function from file: venus_human_trap.dm
        public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null)
        {
            Ent_Dynamic L = null;


            if (O is Mob_Living)
            {
                L = O;

                if (!Lang13.Bool(((dynamic)L).faction.Contains("vines")))
                {
                    ((Mob_Living)L).adjustBruteLoss(5);
                    ((dynamic)L).WriteMsg("<span class='alert'>You cut yourself on the thorny vines.</span>");
                }
            }
            return(null);
        }
Ejemplo n.º 2
0
        // Function from file: disposal-unit.dm
        public void eject(  )
        {
            dynamic     T  = null;
            Ent_Dynamic AM = null;

            T = GlobalFuncs.get_turf(this);

            foreach (dynamic _a in Lang13.Enumerate(this, typeof(Ent_Dynamic)))
            {
                AM = _a;

                AM.forceMove(T);
                AM.pipe_eject(0);
            }
            this.update();
            return;
        }
Ejemplo n.º 3
0
        // Function from file: step_triggers.dm
        public override bool Trigger(Ent_Dynamic A = null)
        {
            Tile dest = null;
            EffectSystem_SparkSpread s  = null;
            EffectSystem_SparkSpread s2 = null;
            EffectSystem_SmokeSpread s3 = null;
            EffectSystem_SmokeSpread s4 = null;

            dest = Map13.GetTile(this.locationx, this.locationy, this.z);
            A.Move(dest);

            if (this.entersparks)
            {
                s = new EffectSystem_SparkSpread();
                s.set_up(4, 1, this);
                s.start();
            }

            if (this.exitsparks)
            {
                s2 = new EffectSystem_SparkSpread();
                s2.set_up(4, 1, dest);
                s2.start();
            }

            if (this.entersmoke)
            {
                s3 = new EffectSystem_SmokeSpread();
                s3.set_up(4, 1, this, 0);
                s3.start();
            }

            if (this.exitsmoke)
            {
                s4 = new EffectSystem_SmokeSpread();
                s4.set_up(4, 1, dest, 0);
                s4.start();
            }
            this.uses--;

            if (this.uses == 0)
            {
                GlobalFuncs.qdel(this);
            }
            return(false);
        }
Ejemplo n.º 4
0
        // Function from file: growninedible.dm
        public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null)
        {
            Ent_Dynamic M      = null;
            int         stun   = 0;
            int         weaken = 0;


            if (O is Mob_Living_Carbon)
            {
                M      = O;
                stun   = Num13.MaxInt(1, Num13.MinInt(((int)((this.potency ?? 0) / 10)), 10));
                weaken = Num13.MaxInt(((int)(0.5)), Num13.MinInt(((int)((this.potency ?? 0) / 20)), 5));
                ((dynamic)M).slip(stun, weaken, this);
                return(1);
            }
            return(null);
        }
Ejemplo n.º 5
0
        // Function from file: morgue.dm
        public void open(  )
        {
            Tile        T  = null;
            Ent_Dynamic AM = null;

            GlobalFuncs.playsound(this.loc, "sound/items/Deconstruct.ogg", 50, 1);
            T = Map13.GetStep(this, this.opendir);

            foreach (dynamic _a in Lang13.Enumerate(this, typeof(Ent_Dynamic)))
            {
                AM = _a;

                AM.forceMove(T);
            }
            this.update_icon();
            return;
        }
Ejemplo n.º 6
0
        // Function from file: transit.dm
        public override dynamic Entered(Ent_Dynamic Obj = null, Ent_Static oldloc = null)
        {
            int  max  = 0;
            int  min  = 0;
            int  ___z = 0;
            int  ___x = 0;
            int  ___y = 0;
            Tile T    = null;


            if (!(Obj != null))
            {
                return(null);
            }
            max  = Game13.map_size_x - 7;
            min  = 8;
            ___z = Rand13.Int(3, 7);

            switch ((int)(this.dir))
            {
            case 2:
                ___x = Rand13.Int(min, max);
                ___y = max;
                break;

            case 8:
                ___x = max;
                ___y = Rand13.Int(min, max);
                break;

            case 4:
                ___x = min;
                ___y = Rand13.Int(min, max);
                break;

            default:
                ___x = Rand13.Int(min, max);
                ___y = min;
                break;
            }
            T       = Map13.GetTile(___x, ___y, ___z);
            Obj.loc = T;
            Obj.newtonian_move(this.dir);
            return(null);
        }
        // Function from file: humanoid.dm
        public override void alien_evolve(Mob_Living_Carbon_Alien_Humanoid_Royal new_xeno = null)
        {
            Ent_Dynamic A = null;

            this.drop_l_hand();
            this.drop_r_hand();

            foreach (dynamic _a in Lang13.Enumerate(this.stomach_contents, typeof(Ent_Dynamic)))
            {
                A = _a;

                this.stomach_contents.Remove(A);
                new_xeno.stomach_contents.Add(A);
                A.loc = new_xeno;
            }
            base.alien_evolve(new_xeno);
            return;
        }
        // Function from file: abandoned_crates.dm
        public void boom(dynamic user = null)
        {
            Ent_Dynamic AM = null;
            dynamic     T  = null;

            user.WriteMsg("<span class='danger'>The crate's anti-tamper system activates!</span>");

            foreach (dynamic _a in Lang13.Enumerate(this, typeof(Ent_Dynamic)))
            {
                AM = _a;

                GlobalFuncs.qdel(AM);
            }
            T = GlobalFuncs.get_turf(this);
            GlobalFuncs.explosion(T, -1, -1, 1, 1);
            GlobalFuncs.qdel(this);
            return;
        }
Ejemplo n.º 9
0
        // Function from file: mines.dm
        public virtual void triggermine(Ent_Dynamic victim = null)
        {
            EffectSystem_SparkSpread s = null;


            if (this.triggered)
            {
                return;
            }
            this.visible_message(new Txt("<span class='danger'>").item(victim).str(" sets off ").icon(this).str(" ").item(this).str("!</span>").ToString());
            s = new EffectSystem_SparkSpread();
            s.set_up(3, 1, this);
            s.start();
            this.mineEffect(victim);
            this.triggered = true;
            GlobalFuncs.qdel(this);
            return;
        }
Ejemplo n.º 10
0
        // Function from file: say.dm
        public virtual void send_speech(dynamic message = null, double?range = null, dynamic source = null, string bubble_type = null, ByTable spans = null)
        {
            range  = range ?? 7;
            source = source ?? this;

            string      rendered = null;
            Ent_Dynamic AM       = null;

            rendered = this.compose_message(this, this.languages, message, null, spans);

            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_hearers_in_view(range, this), typeof(Ent_Dynamic)))
            {
                AM = _a;

                AM.Hear(rendered, this, this.languages, message, null, spans);
            }
            return;
        }
Ejemplo n.º 11
0
        // Function from file: shuttle.dm
        public void roadkill(ByTable L = null, int dir = 0, dynamic x = null, dynamic y = null)
        {
            dynamic     T  = null;
            Ent_Dynamic AM = null;
            Ent_Dynamic M  = null;


            foreach (dynamic _b in Lang13.Enumerate(L))
            {
                T = _b;


                foreach (dynamic _a in Lang13.Enumerate(T, typeof(Ent_Dynamic)))
                {
                    AM = _a;


                    if (AM is Mob)
                    {
                        if (AM is Mob_Living)
                        {
                            M = AM;
                            ((Mob)M).Paralyse(10);
                            ((dynamic)M).take_organ_damage(80);
                            M.anchored = 0;
                        }
                        else
                        {
                            continue;
                        }
                    }

                    if (!Lang13.Bool(AM.anchored))
                    {
                        Map13.Step(AM, dir);
                    }
                    else
                    {
                        GlobalFuncs.qdel(AM);
                    }
                }
            }
            return;
        }
Ejemplo n.º 12
0
        // Function from file: closets.dm
        public virtual void take_contents(  )
        {
            dynamic     T  = null;
            Ent_Dynamic AM = null;

            T = GlobalFuncs.get_turf(this);

            foreach (dynamic _a in Lang13.Enumerate(T, typeof(Ent_Dynamic)))
            {
                AM = _a;


                if (this.insert(AM) == -1)
                {
                    break;
                }
            }
            return;
        }
Ejemplo n.º 13
0
        // Function from file: martial.dm
        public void Suplex(dynamic A = null, Ent_Dynamic D = null)
        {
            double armor_block = 0;

            D.visible_message("<span class='danger'>" + A + " suplexes " + D + "!</span>", "<span class='userdanger'>" + A + " suplexes " + D + "!</span>");
            D.forceMove(A.loc);
            armor_block = ((Mob_Living)D).run_armor_check(null, "melee");
            ((Mob_Living)D).apply_damage(30, "brute", null, armor_block);
            ((Mob_Living)D).apply_effect(6, "weaken", armor_block);
            GlobalFuncs.add_logs(A, D, "suplexed");
            ((Ent_Static)A).SpinAnimation(10, 1);
            D.SpinAnimation(10, 1);
            Task13.Schedule(3, (Task13.Closure)(() => {
                armor_block = ((Mob_Living)A).run_armor_check(null, "melee");
                ((Mob_Living)A).apply_effect(4, "weaken", armor_block);
                return;
            }));
            return;
        }
Ejemplo n.º 14
0
        // Function from file: order.dm
        public Obj_Item_Weapon_Paper_Manifest generateManifest(dynamic C = null)
        {
            Obj_Item_Weapon_Paper_Manifest P = null;
            dynamic     station_name         = null;
            Ent_Dynamic AM = null;

            P            = new Obj_Item_Weapon_Paper_Manifest(C, this.id, this.pack.cost);
            station_name = ((P.errors & 1) != 0 ? ((dynamic)(GlobalFuncs.new_station_name())) : GlobalFuncs.station_name());
            P.name       = "shipping manifest - #" + this.id + " (" + this.pack.name + ")";
            P.info      += "<h2>" + GlobalFuncs.command_name() + " Shipping Manifest</h2>";
            P.info      += "<hr/>";
            P.info      += "Order #" + this.id + "<br/>";
            P.info      += "Destination: " + station_name + "<br/>";
            P.info      += "Item: " + this.pack.name + "<br/>";
            P.info      += "Contents: <br/>";
            P.info      += "<ul>";

            foreach (dynamic _a in Lang13.Enumerate(C.contents - P, typeof(Ent_Dynamic)))
            {
                AM = _a;


                if ((P.errors & 2) != 0)
                {
                    if (Rand13.PercentChance(50))
                    {
                        P.info += "<li>" + AM.name + "</li>";
                    }
                    else
                    {
                        continue;
                    }
                }
                P.info += "<li>" + AM.name + "</li>";
            }
            P.info += "</ul>";
            P.info += "<h4>Stamp below to confirm receipt of goods:</h4>";
            P.update_icon();
            P.loc      = C;
            C.manifest = P;
            C.update_icon();
            return(P);
        }
Ejemplo n.º 15
0
        // Function from file: windowdoor.dm
        public override bool hitby(Ent_Dynamic AM = null, bool?skipcatch = null, bool?hitpush = null, bool?blocked = null)
        {
            dynamic tforce = null;

            base.hitby(AM, skipcatch, hitpush, blocked);
            tforce = 0;

            if (AM is Mob)
            {
                tforce = 40;
            }
            else
            {
                tforce = ((dynamic)AM).throwforce;
            }
            GlobalFuncs.playsound(this.loc, "sound/effects/Glasshit.ogg", 100, 1);
            this.take_damage(tforce);
            return(false);
        }
Ejemplo n.º 16
0
        // Function from file: morgue.dm
        public void close(  )
        {
            Ent_Dynamic AM = null;

            GlobalFuncs.playsound(this.loc, "sound/items/Deconstruct.ogg", 50, 1);

            foreach (dynamic _a in Lang13.Enumerate(this.connected.loc, typeof(Ent_Dynamic)))
            {
                AM = _a;


                if (!Lang13.Bool(AM.anchored) || AM == this.connected)
                {
                    AM.forceMove(this);
                }
            }
            this.update_icon();
            return;
        }
Ejemplo n.º 17
0
        // Function from file: atoms_movable.dm
        public virtual bool forceMove(dynamic destination = null)
        {
            Ent_Static  oldloc   = null;
            dynamic     old_area = null;
            dynamic     destarea = null;
            Ent_Dynamic AM       = null;


            if (Lang13.Bool(destination))
            {
                oldloc = this.loc;

                if (oldloc != null)
                {
                    oldloc.Exited(this, destination);
                }
                this.loc = destination;
                ((Base_Static)destination).Entered(this, oldloc);
                old_area = GlobalFuncs.get_area(oldloc);
                destarea = GlobalFuncs.get_area(destination);

                if (old_area != destarea)
                {
                    ((Base_Static)destarea).Entered(this, null);
                }

                foreach (dynamic _a in Lang13.Enumerate(destination, typeof(Ent_Dynamic)))
                {
                    AM = _a;


                    if (AM == this)
                    {
                        continue;
                    }
                    AM.Crossed(this);
                }
                this.Moved(oldloc, 0);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 18
0
        // Function from file: secbot.dm
        public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null)
        {
            Ent_Dynamic C = null;


            if (O is Mob && Lang13.Bool(this.target))
            {
                C = O;

                if (!(C is Mob_Living_Carbon) || !(C != null) || Map13.GetDistance(this, this.target) <= 1)
                {
                    return(null);
                }
                C.visible_message("<span class='warning'>" + Rand13.Pick(new object [] { "" + C + " dives out of " + this + "'s way!", "" + C + " stumbles over " + this + "!", "" + C + " jumps out of " + this + "'s path!", "" + C + " trips over " + this + " and falls!", "" + C + " topples over " + this + "!", "" + C + " leaps out of " + this + "'s way!" }) + "</span>");
                ((dynamic)C).Weaken(2);
                return(null);
            }
            base.Crossed(O, (object)(X));
            return(null);
        }
Ejemplo n.º 19
0
        // Function from file: mines.dm
        public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null)
        {
            Ent_Dynamic SA = null;


            if (O is Mob_Living_SimpleAnimal)
            {
                SA = O;

                if (!Lang13.Bool(((dynamic)SA).flying))
                {
                    this.triggermine(SA);
                }
            }
            else
            {
                this.triggermine(O);
            }
            return(null);
        }
Ejemplo n.º 20
0
        // Function from file: transit_tube.dm
        public override bool ex_act(double?severity = null, dynamic target = null)
        {
            Ent_Static  oldloc = null;
            Ent_Dynamic AM     = null;


            if (3 - (severity ?? 0) >= 0)
            {
                oldloc = this.loc;
                base.ex_act((severity ?? 0) + 1, (object)(target));

                foreach (dynamic _a in Lang13.Enumerate(this.contents, typeof(Ent_Dynamic)))
                {
                    AM = _a;

                    AM.loc = oldloc;
                }
            }
            return(false);
        }
Ejemplo n.º 21
0
        // Function from file: runes.dm
        public void stun_he(Ent_Dynamic M = null)
        {
            Ent_Dynamic C = null;


            if (!GlobalFuncs.iscultist(M) && !Lang13.Bool(((dynamic)M).null_rod_check()))
            {
                ((dynamic)M).WriteMsg("<span class='cultitalic'><b>You are disoriented by " + this + "!</b></span>");
                ((dynamic)M).Weaken(3);
                ((dynamic)M).Stun(3);
                ((dynamic)M).flash_eyes(1, 1);

                if (M is Mob_Living_Carbon)
                {
                    C = M;
                    ((dynamic)C).silent += 3;
                }
            }
            return;
        }
Ejemplo n.º 22
0
        // Function from file: chameleonproj.dm
        public void eject_all(  )
        {
            Ent_Dynamic A = null;
            Ent_Dynamic M = null;


            foreach (dynamic _a in Lang13.Enumerate(this.active_dummy, typeof(Ent_Dynamic)))
            {
                A = _a;

                A.loc = this.active_dummy.loc;

                if (A is Mob)
                {
                    M = A;
                    ((dynamic)M).reset_perspective(null);
                }
            }
            return;
        }
Ejemplo n.º 23
0
        // Function from file: shieldgen.dm
        public override bool hitby(Ent_Dynamic AM = null, bool?skipcatch = null, bool?hitpush = null, bool?blocked = null)
        {
            dynamic     tforce = null;
            Ent_Dynamic O      = null;

            tforce = 0;

            if (AM is Mob)
            {
                tforce = 40;
            }
            else
            {
                O      = AM;
                tforce = ((dynamic)O).throwforce;
            }
            base.hitby(AM, skipcatch, hitpush, blocked);
            this.take_damage(tforce);
            return(false);
        }
Ejemplo n.º 24
0
        // Function from file: conveyor2.dm
        public override int?process(dynamic seconds = null)
        {
            int         items_moved = 0;
            Ent_Dynamic A           = null;


            if ((this.stat & 3) != 0)
            {
                return(null);
            }

            if (!(this.operating != 0))
            {
                return(null);
            }
            this.f_use_power(100);
            this.affecting = this.loc.contents - this;
            Task13.Sleep(1);
            items_moved = 0;

            foreach (dynamic _a in Lang13.Enumerate(this.affecting, typeof(Ent_Dynamic)))
            {
                A = _a;


                if (!Lang13.Bool(A.anchored))
                {
                    if (A.loc == this.loc)
                    {
                        Map13.Step(A, ((int)(this.movedir ?? 0)));
                        items_moved++;
                    }
                }

                if (items_moved >= 10)
                {
                    break;
                }
            }
            return(null);
        }
Ejemplo n.º 25
0
        // Function from file: step_triggers.dm
        public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null)
        {
            base.Crossed(O, (object)(X));

            if (!(O != null))
            {
                return(null);
            }

            if (O is Mob_Dead_Observer && !this.affect_ghosts)
            {
                return(null);
            }

            if (!(O is Mob) && this.mobs_only)
            {
                return(null);
            }
            this.Trigger(O);
            return(null);
        }
Ejemplo n.º 26
0
        // Function from file: implantchair.dm
        public bool put_mob(Ent_Dynamic M = null)
        {
            if (!(M is Mob_Living_Carbon))
            {
                Task13.User.WriteMsg("<span class='warning'>The " + this.name + " cannot hold this!</span>");
                return(false);
            }

            if (Lang13.Bool(this.occupant))
            {
                Task13.User.WriteMsg("<span class='warning'>The " + this.name + " is already occupied!</span>");
                return(false);
            }
            M.__CallVerb("Stop Pulling");
            M.loc = this;
            ((dynamic)M).reset_perspective(this);
            this.occupant = M;
            this.add_fingerprint(Task13.User);
            this.icon_state = "implantchair_on";
            return(true);
        }
Ejemplo n.º 27
0
        // Function from file: Sleeper.dm
        public override bool blob_act(dynamic severity = null)
        {
            dynamic     T = null;
            Ent_Dynamic A = null;


            if (Rand13.PercentChance(75))
            {
                T = GlobalFuncs.get_turf(this);

                foreach (dynamic _a in Lang13.Enumerate(this, typeof(Ent_Dynamic)))
                {
                    A = _a;

                    A.forceMove(T);
                    A.blob_act();
                }
                GlobalFuncs.qdel(this);
            }
            return(false);
        }
Ejemplo n.º 28
0
        // Function from file: humans.dm
        public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null)
        {
            Ent_Dynamic             H = null;
            Obj_Item_Clothing_Shoes S = null;


            if (O is Mob_Living_Carbon_Human)
            {
                H = O;
                S = ((dynamic)H).shoes;

                if (S != null && Lang13.Bool(S.bloody_shoes[this.blood_state]))
                {
                    S.bloody_shoes[this.blood_state] = Num13.MaxInt(Convert.ToInt32(S.bloody_shoes[this.blood_state] - 5), 0);
                    this.entered_dirs |= H.dir;
                    this.shoe_types.Or(((dynamic)H).shoes.type);
                }
            }
            this.update_icon();
            return(null);
        }
Ejemplo n.º 29
0
        // Function from file: disposal-structures.dm
        public void merge(dynamic other = null)
        {
            Ent_Dynamic AM = null;
            Ent_Dynamic M  = null;


            foreach (dynamic _a in Lang13.Enumerate(other, typeof(Ent_Dynamic)))
            {
                AM = _a;

                AM.loc = this;

                if (AM is Mob)
                {
                    M = AM;
                    ((dynamic)M).reset_perspective(this);
                }
            }
            GlobalFuncs.qdel(other);
            return;
        }
Ejemplo n.º 30
0
        // Function from file: Hallucination.dm
        public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null)
        {
            dynamic O2 = null;


            if (O == this.my_target)
            {
                Map13.StepAway(this, this.my_target, 2);

                if (Rand13.PercentChance(30))
                {
                    foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewersExcludeThis(this.my_target, Game13.view)))
                    {
                        O2 = _a;

                        O2.WriteMsg("<span class='danger'>" + this.my_target + " stumbles around.</span>");
                    }
                }
            }
            return(null);
        }