Esempio n. 1
0
        // Function from file: pyrotechnic_reagents.dm
        public override void on_ex_act(dynamic severity = null)
        {
            dynamic location = null;
            EffectSystem_ReagentsExplosion e = null;

            location = GlobalFuncs.get_turf(((dynamic)this.holder).my_atom);
            e        = new EffectSystem_ReagentsExplosion();
            e.set_up(Num13.Round(this.volume / 6, 1) + 1, location, 0, 0, false);
            e.start();
            ((dynamic)this.holder).clear_reagents();
            return;
        }
Esempio n. 2
0
        // Function from file: pyrotechnics.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            dynamic location = null;
            EffectSystem_ReagentsExplosion e = null;

            location = GlobalFuncs.get_turf(holder.my_atom);
            e        = new EffectSystem_ReagentsExplosion();
            e.set_up(Num13.Round((created_volume ?? 0) / 10, 1), location, 0, 0);
            e.start();
            holder.clear_reagents();
            return;
        }
        // Function from file: pyrotechnics.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            dynamic location = null;
            EffectSystem_ReagentsExplosion e = null;


            if (Lang13.Bool(holder.has_reagent("stabilizing_agent")))
            {
                return;
            }
            holder.remove_reagent("nitroglycerin", created_volume);
            location = GlobalFuncs.get_turf(holder.my_atom);
            e        = new EffectSystem_ReagentsExplosion();
            e.set_up(Num13.Round((created_volume ?? 0) / 2, 1), location, 0, 0);
            e.start();
            holder.clear_reagents();
            return;
        }
        public void f_light(string flavor_text = null)
        {
            EffectSystem_ReagentsExplosion e = null;
            Ent_Static M = null;
            EffectSystem_ReagentsExplosion e2 = null;
            Ent_Static M2 = null;
            dynamic    T  = null;
            Ent_Static M3 = null;


            if (!this.lit)
            {
                this.lit         = true;
                this.name        = "lit " + this.name;
                this.attack_verb = new ByTable(new object [] { "burnt", "singed" });
                this.hitsound    = "sound/items/welder.ogg";
                this.damtype     = "fire";
                this.force       = 4;

                if (this.reagents.get_reagent_amount("plasma"))
                {
                    e = new EffectSystem_ReagentsExplosion();
                    e.set_up(Num13.Round((this.reagents.get_reagent_amount("plasma") ?1:0) / 2.5, 1), GlobalFuncs.get_turf(this), 0, 0);
                    e.start();

                    if (this.loc is Mob)
                    {
                        M = this.loc;
                        ((Mob)M).unEquip(this, 1);
                    }
                    GlobalFuncs.qdel(this);
                    return;
                }

                if (this.reagents.get_reagent_amount("welding_fuel"))
                {
                    e2 = new EffectSystem_ReagentsExplosion();
                    e2.set_up(Num13.Round((this.reagents.get_reagent_amount("welding_fuel") ?1:0) / 5, 1), GlobalFuncs.get_turf(this), 0, 0);
                    e2.start();

                    if (this.loc is Mob)
                    {
                        M2 = this.loc;
                        ((Mob)M2).unEquip(this, 1);
                    }
                    GlobalFuncs.qdel(this);
                    return;
                }
                this.flags &= 49151;
                this.reagents.handle_reactions();
                this.icon_state = this.icon_on;
                this.item_state = this.icon_on;

                if (Lang13.Bool(flavor_text))
                {
                    T = GlobalFuncs.get_turf(this);
                    ((Ent_Static)T).visible_message(flavor_text);
                }
                GlobalVars.SSobj.processing.Or(this);

                if (this.loc is Mob)
                {
                    M3 = this.loc;
                    ((dynamic)M3).update_inv_wear_mask();
                    ((dynamic)M3).update_inv_l_hand();
                    ((dynamic)M3).update_inv_r_hand();
                }
            }
            return;
        }