示例#1
0
        // Function from file: pyrotechnics.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            double  smoke_radius            = 0;
            dynamic location                = null;
            EffectSystem_SmokeSpread_Chem S = null;


            if (Lang13.Bool(holder.has_reagent("stabilizing_agent")))
            {
                return;
            }
            holder.remove_reagent("smoke_powder", created_volume);
            smoke_radius = Num13.Round(Math.Sqrt((created_volume ?? 0) / 2), 1);
            location     = GlobalFuncs.get_turf(holder.my_atom);
            S            = new EffectSystem_SmokeSpread_Chem();
            S.attach(location);
            GlobalFuncs.playsound(location, "sound/effects/smoke.ogg", 50, 1, -3);

            if (S != null)
            {
                S.set_up(holder, smoke_radius, 0, location);
                S.start();
            }

            if (holder != null && Lang13.Bool(holder.my_atom))
            {
                holder.clear_reagents();
            }
            return;
        }
示例#2
0
		// Function from file: pyrotechnics.dm
		public override void on_reaction( Reagents holder = null, double? created_volume = null ) {
			dynamic T = null;
			int range = 0;

			
			if ( Lang13.Bool( holder.has_reagent( "stabilizing_agent" ) ) ) {
				return;
			}
			holder.remove_reagent( "sorium", created_volume );
			T = GlobalFuncs.get_turf( holder.my_atom );
			range = Num13.MaxInt( 1, Num13.MinInt( ((int)( Math.Sqrt( created_volume ??0 ) )), 6 ) );
			this.goonchem_vortex( T, true, range );
			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;
        }
示例#4
0
        // Function from file: pyrotechnics.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            dynamic           location = null;
            Mob_Living_Carbon C        = null;


            if (Lang13.Bool(holder.has_reagent("stabilizing_agent")))
            {
                return;
            }
            holder.remove_reagent("sonic_powder", created_volume);
            location = GlobalFuncs.get_turf(holder.my_atom);
            GlobalFuncs.playsound(location, "sound/effects/bang.ogg", 25, 1);

            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_hearers_in_view((created_volume ?? 0) / 10, location), typeof(Mob_Living_Carbon)))
            {
                C = _a;


                if (C.check_ear_prot())
                {
                    continue;
                }
                C.show_message("<span class='warning'>BANG</span>", 2);
                C.Stun(5);
                C.Weaken(5);
                C.setEarDamage(C.ear_damage + Rand13.Int(0, 5), Num13.MaxInt(((int)(C.ear_deaf ?? 0)), 15));

                if (C.ear_damage >= 15)
                {
                    C.WriteMsg("<span class='warning'>Your ears start to ring badly!</span>");
                }
                else if (C.ear_damage >= 5)
                {
                    C.WriteMsg("<span class='warning'>Your ears start to ring!</span>");
                }
            }
            return;
        }
示例#5
0
        // Function from file: pyrotechnics.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            dynamic location           = null;
            EffectSystem_SparkSpread s = null;
            Mob_Living_Carbon        C = null;


            if (Lang13.Bool(holder.has_reagent("stabilizing_agent")))
            {
                return;
            }
            location = GlobalFuncs.get_turf(holder.my_atom);
            s        = new EffectSystem_SparkSpread();
            s.set_up(2, 1, location);
            s.start();

            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_hearers_in_view((created_volume ?? 0) / 10, location), typeof(Mob_Living_Carbon)))
            {
                C = _a;


                if (C.flash_eyes())
                {
                    if (Map13.GetDistance(C, location) < 4)
                    {
                        C.Weaken(5);
                    }
                    else
                    {
                        C.Stun(5);
                    }
                }
            }
            holder.remove_reagent("flash_powder", created_volume);
            return;
        }