コード例 #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;
		}
コード例 #3
0
        // Function from file: pyrotechnics.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            dynamic T = null;


            if (Lang13.Bool(holder.has_reagent("stabilizing_agent")))
            {
                return;
            }
            T = GlobalFuncs.get_turf(holder.my_atom);

            if (T is Tile_Simulated)
            {
                T.atmos_spawn_air(5, created_volume);
            }
            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;
            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;
        }
コード例 #5
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;
        }
コード例 #6
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;
        }
コード例 #7
0
        // Function from file: seeds.dm
        public override void on_chem_reaction(Reagents S = null)
        {
            ByTable           temp_mut_list = null;
            SpacevineMutation SM            = null;
            SpacevineMutation SM2           = null;
            SpacevineMutation SM3           = null;

            temp_mut_list = new ByTable();

            if (Lang13.Bool(S.has_reagent("sterilizine", 5)))
            {
                foreach (dynamic _a in Lang13.Enumerate(this.mutations, typeof(SpacevineMutation)))
                {
                    SM = _a;


                    if (SM.quality == 2)
                    {
                        temp_mut_list.Add(SM);
                    }
                }

                if (Rand13.PercentChance(20))
                {
                    this.mutations.Remove(Rand13.PickFromTable(temp_mut_list));
                }
                temp_mut_list.Cut();
            }

            if (Lang13.Bool(S.has_reagent("welding_fuel", 5)))
            {
                foreach (dynamic _b in Lang13.Enumerate(this.mutations, typeof(SpacevineMutation)))
                {
                    SM2 = _b;


                    if (SM2.quality == 1)
                    {
                        temp_mut_list.Add(SM2);
                    }
                }

                if (Rand13.PercentChance(20))
                {
                    this.mutations.Remove(Rand13.PickFromTable(temp_mut_list));
                }
                temp_mut_list.Cut();
            }

            if (Lang13.Bool(S.has_reagent("phenol", 5)))
            {
                foreach (dynamic _c in Lang13.Enumerate(this.mutations, typeof(SpacevineMutation)))
                {
                    SM3 = _c;


                    if (SM3.quality == 3)
                    {
                        temp_mut_list.Add(SM3);
                    }
                }

                if (Rand13.PercentChance(20))
                {
                    this.mutations.Remove(Rand13.PickFromTable(temp_mut_list));
                }
            }

            if (Lang13.Bool(S.has_reagent("blood", 15)))
            {
                this.production += Rand13.Int(15, -5);
            }

            if (Lang13.Bool(S.has_reagent("amatoxin", 5)))
            {
                this.production += Rand13.Int(5, -15);
            }

            if (Lang13.Bool(S.has_reagent("plasma", 5)))
            {
                this.potency += Rand13.Int(5, -15);
            }

            if (Lang13.Bool(S.has_reagent("holywater", 10)))
            {
                this.potency += Rand13.Int(15, -5);
            }
            return;
        }