Exemplo n.º 1
0
 // Function from file: constructs.dm
 public override void LoseAggro(  )
 {
     base.LoseAggro();
     this.retreat_distance = Lang13.Initial(this, "retreat_distance");
     this.minimum_distance = Lang13.Initial(this, "minimum_distance");
     return;
 }
Exemplo n.º 2
0
        // Function from file: shapeshift.dm
        public void Restore(Mob_Living shape = null)
        {
            Mob_Living caster = null;
            Mob_Living M      = null;


            foreach (dynamic _a in Lang13.Enumerate(shape, typeof(Mob_Living)))
            {
                M = _a;


                if (this.current_casters.Contains(M))
                {
                    caster = M;
                    break;
                }
            }

            if (!(caster != null))
            {
                return;
            }
            caster.loc           = shape.loc;
            caster.status_flags &= 61439;
            this.clothes_req     = Lang13.Initial(this, "clothes_req");
            this.human_req       = Lang13.Initial(this, "human_req");
            this.current_casters.Remove(caster);
            this.current_shapes.Remove(shape);
            shape.mind.transfer_to(caster);
            GlobalFuncs.qdel(shape);
            return;
        }
        // Function from file: leather.dm
        public override dynamic temperature_expose(GasMixture air = null, dynamic exposed_temperature = null, int?exposed_volume = null)
        {
            Obj_Item_Stack_Sheet_Leather HS  = null;
            Obj_Item_Stack_Sheet_Leather HS2 = null;

            base.temperature_expose(air, (object)(exposed_temperature), exposed_volume);

            if (Convert.ToDouble(exposed_temperature) >= this.drying_threshold_temperature)
            {
                this.wetness--;

                if (this.wetness == 0)
                {
                    foreach (dynamic _a in Lang13.Enumerate(this.loc, typeof(Obj_Item_Stack_Sheet_Leather)))
                    {
                        HS = _a;


                        if ((HS.amount ?? 0) < 50)
                        {
                            HS.amount++;
                            this.use(1);
                            this.wetness = Lang13.Initial(this, "wetness");
                            break;
                        }
                    }
                    HS2          = new Obj_Item_Stack_Sheet_Leather(this.loc);
                    HS2.amount   = 1;
                    this.wetness = Lang13.Initial(this, "wetness");
                    this.use(1);
                }
            }
            return(null);
        }
Exemplo n.º 4
0
        // Function from file: server.dm
        public override int?process(dynamic seconds = null)
        {
            GasMixture environment = null;
            int        updateRD    = 0;
            dynamic    v           = null;
            dynamic    T           = null;

            environment = this.loc.return_air();

            dynamic _a = environment.temperature;             // Was a switch-case, sorry for the mess.

            if (0 <= _a && _a <= 273.41)
            {
                this.health = Num13.MinInt(100, this.health + 1);
            }
            else if (273.41 <= _a && _a <= 313.41)
            {
                this.health = Num13.MaxInt(0, Num13.MinInt(this.health, 100));
            }
            else if (313.41 <= _a && _a <= 343.41)
            {
                this.health = Num13.MaxInt(0, this.health - 1);
            }

            if (this.health <= 0)
            {
                updateRD = 0;
                this.files.known_designs = new ByTable();

                foreach (dynamic _b in Lang13.Enumerate(this.files.known_tech))
                {
                    v = _b;

                    T = this.files.known_tech[v];

                    if (Rand13.PercentChance(1))
                    {
                        updateRD++;
                        T.level--;
                    }
                }

                if (updateRD != 0)
                {
                    this.files.RefreshResearch();
                }
            }

            if (Lang13.Bool(this.delay))
            {
                this.delay--;
            }
            else
            {
                this.produce_heat(this.heat_gen);
                this.delay = Lang13.Initial(this, "delay");
            }
            return(null);
        }
Exemplo n.º 5
0
 // Function from file: customizables.dm
 public override void initialize_slice(dynamic slice = null, double reagents_per_slice = 0)
 {
     base.initialize_slice((object)(slice), reagents_per_slice);
     slice.name          = "" + this.customname + " " + Lang13.Initial(slice, "name");
     slice.filling_color = this.filling_color;
     slice.update_overlays(this);
     return;
 }
 // Function from file: assault_pod.dm
 public override int request(Obj_DockingPort_Stationary S = null, double?coefficient = null, dynamic signalOrigin = null, string reason = null, bool?redAlert = null)
 {
     if (this.z == Lang13.Initial(this, "z"))
     {
         return(base.request(S, coefficient, (object)(signalOrigin), reason, redAlert));
     }
     return(0);
 }
Exemplo n.º 7
0
 // Function from file: structures.dm
 public virtual void update_icons(  )
 {
     if (this.autocolours)
     {
         this.icon_state = "" + Lang13.Initial(this, "icon_state") + "-" + this.side;
     }
     return;
 }
        // Function from file: handcuffs.dm
        public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null)
        {
            Ent_Dynamic L        = null;
            bool        snap     = false;
            string      def_zone = null;
            Ent_Dynamic C        = null;
            Ent_Dynamic SA       = null;


            if (this.armed && this.loc is Tile)
            {
                if (O is Mob_Living)
                {
                    L        = O;
                    snap     = false;
                    def_zone = "chest";

                    if (L is Mob_Living_Carbon)
                    {
                        C    = L;
                        snap = true;

                        if (!Lang13.Bool(((dynamic)C).lying))
                        {
                            def_zone = Rand13.Pick(new object [] { "l_leg", "r_leg" });

                            if (!Lang13.Bool(((dynamic)C).legcuffed))
                            {
                                ((dynamic)C).legcuffed = this;
                                this.loc = C;
                                ((dynamic)C).update_inv_legcuffed();
                                GlobalFuncs.feedback_add_details("handcuffs", "B");
                            }
                        }
                    }
                    else if (L is Mob_Living_SimpleAnimal)
                    {
                        SA = L;

                        if (!Lang13.Bool(((dynamic)SA).flying) && Convert.ToDouble(((dynamic)SA).mob_size) > 0)
                        {
                            snap = true;
                        }
                    }

                    if (snap)
                    {
                        this.armed      = false;
                        this.icon_state = "" + Lang13.Initial(this, "icon_state") + this.armed;
                        GlobalFuncs.playsound(this.loc, "sound/effects/snap.ogg", 50, 1);
                        L.visible_message(new Txt("<span class='danger'>").item(L).str(" triggers ").the(this).item().str(".</span>").ToString(), new Txt("<span class='userdanger'>You trigger ").the(this).item().str("!</span>").ToString());
                        ((dynamic)L).apply_damage(this.trap_damage, "brute", def_zone);
                    }
                }
            }
            base.Crossed(O, (object)(X));
            return(null);
        }
Exemplo n.º 9
0
        // Function from file: cigs_lighters.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            dynamic G             = null;
            string  lighting_text = null;


            if (A is Obj_Item_Weapon_ReagentContainers_Food_Snacks_Grown)
            {
                G = A;

                if (!this.packeditem)
                {
                    if (G.dry)
                    {
                        user.WriteMsg("<span class='notice'>You stuff " + A + " into " + this + ".</span>");
                        this.smoketime  = 400;
                        this.packeditem = true;
                        this.name       = "" + A.name + "-packed " + Lang13.Initial(this, "name");

                        if (Lang13.Bool(A.reagents))
                        {
                            ((Reagents)A.reagents).trans_to(this, A.reagents.total_volume);
                        }
                        GlobalFuncs.qdel(A);
                    }
                    else
                    {
                        user.WriteMsg("<span class='warning'>It has to be dried first!</span>");
                    }
                }
                else
                {
                    user.WriteMsg("<span class='warning'>It is already packed!</span>");
                }
            }
            else
            {
                lighting_text = this.is_lighter(A, user);

                if (Lang13.Bool(lighting_text))
                {
                    if (this.smoketime > 0)
                    {
                        this.f_light(lighting_text);
                    }
                    else
                    {
                        user.WriteMsg("<span class='warning'>There is nothing to smoke!</span>");
                    }
                }
                else
                {
                    user.WriteMsg("<span class='warning'>You can't put that in the pipe!</span>");
                }
            }
            base.attackby((object)(A), (object)(user), _params, silent, replace_spent);
            return(null);
        }
Exemplo n.º 10
0
		// Function from file: reagentgrinder.dm
		public void juice(  ) {
			int offset = 0;
			Obj_Item_Weapon_ReagentContainers_Food_Snacks O = null;
			dynamic allowed = null;
			dynamic r_id = null;
			dynamic space = null;
			int amount = 0;

			this.power_change();

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

			if ( !Lang13.Bool( this.beaker ) || Lang13.Bool( this.beaker ) && ( this.beaker.reagents.total_volume ??0) >= Convert.ToDouble( this.beaker.reagents.maximum_volume ) ) {
				return;
			}
			GlobalFuncs.playsound( this.loc, "sound/machines/juicer.ogg", 20, 1 );
			offset = ( Rand13.PercentChance( 50 ) ? -2 : 2 );
			Icon13.Animate( new ByTable().Set( 1, this ).Set( "pixel_x", this.pixel_x + offset ).Set( "time", 0.2 ).Set( "loop", 250 ) );
			this.operating = true;
			this.updateUsrDialog();
			Task13.Schedule( 50, (Task13.Closure)(() => {
				this.pixel_x = Convert.ToInt32( Lang13.Initial( this, "pixel_x" ) );
				this.operating = false;
				this.updateUsrDialog();
				return;
			}));

			foreach (dynamic _b in Lang13.Enumerate( this.holdingitems, typeof(Obj_Item_Weapon_ReagentContainers_Food_Snacks) )) {
				O = _b;
				

				if ( ( this.beaker.reagents.total_volume ??0) >= Convert.ToDouble( this.beaker.reagents.maximum_volume ) ) {
					break;
				}
				allowed = this.get_allowed_juice_by_id( O );

				if ( allowed == null ) {
					break;
				}

				foreach (dynamic _a in Lang13.Enumerate( allowed )) {
					r_id = _a;
					
					space = this.beaker.reagents.maximum_volume - this.beaker.reagents.total_volume;
					amount = this.get_juice_amount( O );
					this.beaker.reagents.add_reagent( r_id, Num13.MinInt( amount, Convert.ToInt32( space ) ) );

					if ( ( this.beaker.reagents.total_volume ??0) >= Convert.ToDouble( this.beaker.reagents.maximum_volume ) ) {
						break;
					}
				}
				this.remove_object( O );
			}
			return;
		}
        // Function from file: dog.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            if (Lang13.Bool(this.inventory_head) && Lang13.Bool(this.inventory_back))
            {
                if (this.inventory_head is Obj_Item_Clothing_Head_Helmet && this.inventory_back is Obj_Item_Clothing_Suit_Armor)
                {
                    if (Lang13.Bool(A.force))
                    {
                        user.WriteMsg(new Txt("<span class='warning'>").item(this).str(" is wearing too much armor! You can't cause ").him_her_it_them().str(" any damage.</span>").ToString());
                        this.visible_message("<span class='danger'>" + user + " hits " + this + " with " + A + ", however " + this + " is too armored.</span>");
                    }
                    else
                    {
                        user.WriteMsg(new Txt("<span class='warning'>").item(this).str(" is wearing too much armor! You can't reach ").his_her_its_their().str(" skin.<span>").ToString());
                        this.visible_message("" + user + " gently taps " + this + " with " + A + ".");
                    }

                    if (Convert.ToDouble(this.health) > 0 && Rand13.PercentChance(15))
                    {
                        this.emote("me", 1, "looks at " + user + " with " + Rand13.Pick(new object [] { "an amused", "an annoyed", "a confused", "a resentful", "a happy", "an excited" }) + " expression.");
                    }
                    return(null);
                }
            }

            if (A is Obj_Item_Weapon_Razor)
            {
                if (this.shaved)
                {
                    user.WriteMsg("<span class='warning'>You can't shave this corgi, it's already been shaved!</span>");
                    return(null);
                }
                ((Ent_Static)user).visible_message(new Txt().item(user).str(" starts to shave ").item(this).str(" using ").the(A).item().str(".").ToString(), new Txt("<span class='notice'>You start to shave ").item(this).str(" using ").the(A).item().str("...</span>").ToString());

                if (GlobalFuncs.do_after(user, 50, null, this))
                {
                    ((Ent_Static)user).visible_message(new Txt().item(user).str(" shaves ").item(this).str("'s hair using ").the(A).item().str(".").ToString());
                    GlobalFuncs.playsound(this.loc, "sound/items/welder2.ogg", 20, 1);
                    this.shaved      = true;
                    this.icon_living = "" + Lang13.Initial(this, "icon_living") + "_shaved";
                    this.icon_dead   = "" + Lang13.Initial(this, "icon_living") + "_shaved_dead";

                    if (this.stat == 0)
                    {
                        this.icon_state = this.icon_living;
                    }
                    else
                    {
                        this.icon_state = this.icon_dead;
                    }
                }
                return(null);
            }
            base.attackby((object)(A), (object)(user), _params, silent, replace_spent);
            this.update_corgi_fluff();
            return(null);
        }
Exemplo n.º 12
0
 // Function from file: shadowling_abilities.dm
 public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
 {
     ((Ent_Static)targets).visible_message("<span class='warning'>" + targets + " suddenly fades away!</span>", "<span class='shadowling'>You veil yourself in darkness, making you harder to see.</span>");
     targets.alpha = 10;
     Task13.Sleep(40);
     ((Ent_Static)targets).visible_message("<span class='warning'>" + targets + " appears from nowhere!</span>", "<span class='shadowling'>Your shadowy guise slips away.</span>");
     targets.alpha = Lang13.Initial(targets, "alpha");
     return(false);
 }
Exemplo n.º 13
0
        // Function from file: pool.dm
        public override void ResetVars(params object[] _)
        {
            ByTable _args = new ByTable(new object[] {  }).Extend(_);

            base.ResetVars();
            this.loc      = null;
            this.contents = Lang13.Initial(this, "contents");
            return;
        }
Exemplo n.º 14
0
        // Function from file: chameleonproj.dm
        public Obj_Item_Device_Chameleon(dynamic loc = null) : base((object)(loc))
        {
            Type butt = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            butt = typeof(Obj_Item_Weapon_Cigbutt);
            this.saved_appearance = Lang13.Initial(butt, "appearance");
            return;
        }
Exemplo n.º 15
0
 // Function from file: combat.dm
 public override void go_out(bool?forced = null, Ent_Static newloc = null)
 {
     if (this.occupant != null && Lang13.Bool(((dynamic)this.occupant).client))
     {
         ((dynamic)this.occupant).client.mouse_pointer_icon = Lang13.Initial(((dynamic)this.occupant).client, "mouse_pointer_icon");
     }
     base.go_out(forced, newloc);
     return;
 }
Exemplo n.º 16
0
        // Function from file: lighting_system.dm
        public virtual dynamic ChangeTurf(dynamic path = null)
        {
            dynamic _default = null;

            Obj_Effect_Decal_Cleanable decal = null;
            double     old_lumcount          = 0;
            Type       oldbaseturf           = null;
            ByTable    our_lights            = null;
            Tile_Space S = null;


            if (!Lang13.Bool(path) || path == this.type)
            {
                return(this._internal_ChangeTurf(path));
            }

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

                GlobalFuncs.qdel(decal);
            }

            if (this.light != null)
            {
                GlobalFuncs.qdel(this.light);
            }
            old_lumcount = this.lighting_lumcount - Convert.ToDouble(Lang13.Initial(this, "lighting_lumcount"));
            oldbaseturf  = this.baseturf;
            our_lights   = null;

            if (this.opacity != Lang13.Initial(path, "opacity") && old_lumcount != 0)
            {
                this.UpdateAffectingLights();
            }

            if (this.affecting_lights != null)
            {
                our_lights = this.affecting_lights.Copy();
            }
            _default = this._internal_ChangeTurf(path);
            this.affecting_lights = our_lights;
            this.lighting_changed = true;
            this.update_lumcount(old_lumcount);
            this.baseturf        = oldbaseturf;
            this.lighting_object = Lang13.FindIn(typeof(Dynamic_Light), this);
            this.init_lighting();

            foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInBlock(Map13.GetTile(Num13.MaxInt(this.x - 1, 1), Num13.MaxInt(this.y - 1, 1), this.z), Map13.GetTile(Num13.MinInt(this.x + 1, Game13.map_size_x), Num13.MinInt(this.y + 1, Game13.map_size_y), this.z)), typeof(Tile_Space)))
            {
                S = _b;

                S.update_starlight();
            }
            return(_default);
        }
Exemplo n.º 17
0
 // Function from file: simple_animal.dm
 public override void revive(  )
 {
     this.health     = this.maxHealth;
     this.icon       = Lang13.Initial(this, "icon");
     this.icon_state = this.icon_living;
     this.density    = Lang13.Bool(Lang13.Initial(this, "density"));
     this.update_canmove();
     base.revive();
     return;
 }
 // Function from file: facehugger.dm
 public void GoActive(  )
 {
     if (this.stat == 2 || this.stat == 0)
     {
         return;
     }
     this.stat       = 0;
     this.icon_state = "" + Lang13.Initial(this, "icon_state");
     return;
 }
Exemplo n.º 19
0
        // Function from file: telecrystalconsoles.dm
        public override bool update_icon(dynamic new_state = null, dynamic new_icon = null, int?new_px = null, int?new_py = null)
        {
            base.update_icon((object)(new_state), (object)(new_icon), new_px, new_py);

            if (Lang13.Bool(this.uplinkholder))
            {
                this.overlays.Add("" + Lang13.Initial(this, "icon_state") + "-closed");
            }
            return(false);
        }
 // Function from file: lichdom.dm
 public Obj_Effect_ProcHolder_Spell_Targeted_Lichdom(dynamic loc = null) : base((object)(loc))
 {
     if (Lang13.Bool(Lang13.Initial(GlobalVars.ticker.mode, "round_ends_with_antag_death")))
     {
         this.existence_stops_round_end = true;
         GlobalVars.ticker.mode.round_ends_with_antag_death = false;
     }
     // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
     return;
 }
Exemplo n.º 21
0
        // Function from file: abduction_gear.dm
        public override int?process(dynamic seconds = null)
        {
            this.combat_cooldown++;

            if (this.combat_cooldown == Lang13.Initial(this, "combat_cooldown"))
            {
                GlobalVars.SSobj.processing.Remove(this);
            }
            return(null);
        }
Exemplo n.º 22
0
        // Function from file: camera.dm
        public override bool update_icon(dynamic new_state = null, dynamic new_icon = null, int?new_px = null, int?new_py = null)
        {
            this.icon_state = Lang13.Initial(this, "icon_state");

            if ((this.stat & 1) != 0)
            {
                this.icon_state += "b";
            }
            return(false);
        }
Exemplo n.º 23
0
        // Function from file: revolver.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            base.attackby((object)(A), (object)(user), _params, silent, replace_spent);

            if (A is Obj_Item_Weapon_Screwdriver)
            {
                if (this.magazine.caliber == "38")
                {
                    user.WriteMsg("<span class='notice'>You begin to reinforce the barrel of " + this + "...</span>");

                    if (((Obj_Item_AmmoBox_Magazine)this.magazine).ammo_count() != 0)
                    {
                        this.afterattack(user, user);
                        ((Ent_Static)user).visible_message("<span class='danger'>" + this + " goes off!</span>", "<span class='userdanger'>" + this + " goes off in your face!</span>");
                        return(null);
                    }

                    if (GlobalFuncs.do_after(user, 30 / A.toolspeed, null, this))
                    {
                        if (((Obj_Item_AmmoBox_Magazine)this.magazine).ammo_count() != 0)
                        {
                            user.WriteMsg("<span class='warning'>You can't modify it!</span>");
                            return(null);
                        }
                        this.magazine.caliber = "357";
                        this.desc             = "The barrel and chamber assembly seems to have been modified.";
                        user.WriteMsg("<span class='notice'>You reinforce the barrel of " + this + ". Now it will fire .357 rounds.</span>");
                    }
                }
                else
                {
                    user.WriteMsg("<span class='notice'>You begin to revert the modifications to " + this + "...</span>");

                    if (((Obj_Item_AmmoBox_Magazine)this.magazine).ammo_count() != 0)
                    {
                        this.afterattack(user, user);
                        ((Ent_Static)user).visible_message("<span class='danger'>" + this + " goes off!</span>", "<span class='userdanger'>" + this + " goes off in your face!</span>");
                        return(null);
                    }

                    if (GlobalFuncs.do_after(user, 30 / A.toolspeed, null, this))
                    {
                        if (((Obj_Item_AmmoBox_Magazine)this.magazine).ammo_count() != 0)
                        {
                            user.WriteMsg("<span class='warning'>You can't modify it!</span>");
                            return(null);
                        }
                        this.magazine.caliber = "38";
                        this.desc             = Lang13.Initial(this, "desc");
                        user.WriteMsg("<span class='notice'>You remove the modifications on " + this + ". Now it will fire .38 rounds.</span>");
                    }
                }
            }
            return(null);
        }
Exemplo n.º 24
0
        // Function from file: items.dm
        public override bool throw_at(dynamic target = null, double?range = null, dynamic speed = null, dynamic thrower = null, bool?spin = null, bool?diagonals_first = null)
        {
            spin = spin ?? true;

            bool _default = false;

            this.thrownby    = thrower;
            _default         = base.throw_at((object)(target), range, (object)(speed), (object)(thrower), spin, diagonals_first);
            this.throw_speed = Lang13.Initial(this, "throw_speed");
            return(_default);
        }
Exemplo n.º 25
0
        // Function from file: clown_items.dm
        public override bool afterattack(dynamic target = null, dynamic user = null, bool?proximity_flag = null, string click_parameters = null)
        {
            dynamic C = null;


            if (!(proximity_flag == true) || !this.check_allowed_items(target))
            {
                return(false);
            }

            if (Lang13.Bool(user.client) && Lang13.Bool(user.client.screen.Contains(target)))
            {
                user.WriteMsg("<span class='warning'>You need to take that " + target.name + " off before cleaning it!</span>");
            }
            else if (target is Obj_Effect_Decal_Cleanable)
            {
                ((Ent_Static)user).visible_message(new Txt().item(user).str(" begins to scrub ").the(target.name).item().str(" out with ").item(this).str(".").ToString(), new Txt("<span class='warning'>You begin to scrub ").the(target.name).item().str(" out with ").item(this).str("...</span>").ToString());

                if (GlobalFuncs.do_after(user, this.cleanspeed, null, target))
                {
                    user.WriteMsg(new Txt("<span class='notice'>You scrub ").the(target.name).item().str(" out.</span>").ToString());
                    GlobalFuncs.qdel(target);
                }
            }
            else if (target is Mob_Living_Carbon_Human && user.zone_selected == "mouth")
            {
                ((Ent_Static)user).visible_message(new Txt("<span class='warning'>").the(user).item().str(" washes ").the(target).item().str("'s mouth out with ").item(this.name).str("!</span>").ToString(), new Txt("<span class='notice'>You wash ").the(target).item().str("'s mouth out with ").item(this.name).str("!</span>").ToString());
                return(false);
            }
            else if (target is Obj_Structure_Window)
            {
                ((Ent_Static)user).visible_message(new Txt().item(user).str(" begins to clean ").the(target.name).item().str(" with ").item(this).str("...").ToString(), new Txt("<span class='notice'>You begin to clean ").the(target.name).item().str(" with ").item(this).str("...</span>").ToString());

                if (GlobalFuncs.do_after(user, this.cleanspeed, null, target))
                {
                    user.WriteMsg(new Txt("<span class='notice'>You clean ").the(target.name).item().str(".</span>").ToString());
                    target.color = Lang13.Initial(target, "color");
                    ((Ent_Static)target).SetOpacity(Lang13.Initial(target, "opacity"));
                }
            }
            else
            {
                ((Ent_Static)user).visible_message(new Txt().item(user).str(" begins to clean ").the(target.name).item().str(" with ").item(this).str("...").ToString(), new Txt("<span class='notice'>You begin to clean ").the(target.name).item().str(" with ").item(this).str("...</span>").ToString());

                if (GlobalFuncs.do_after(user, this.cleanspeed, null, target))
                {
                    user.WriteMsg(new Txt("<span class='notice'>You clean ").the(target.name).item().str(".</span>").ToString());
                    C = Lang13.FindIn(typeof(Obj_Effect_Decal_Cleanable), target);
                    GlobalFuncs.qdel(C);
                    ((Ent_Static)target).clean_blood();
                }
            }
            return(false);
        }
Exemplo n.º 26
0
 // Function from file: narsie.dm
 public void narsie_spawn_animation(  )
 {
     this.icon      = "icons/obj/narsie_spawn_anim.dmi";
     this.dir       = ((int)(GlobalVars.SOUTH));
     this.move_self = false;
     Icon13.Flick("narsie_spawn_anim", this);
     Task13.Sleep(11);
     this.move_self = true;
     this.icon      = Lang13.Initial(this, "icon");
     return;
 }
        // Function from file: facehugger.dm
        public override bool throw_impact(dynamic target = null, Mob_Living_Carbon thrower = null)
        {
            base.throw_impact((object)(target), thrower);

            if (this.stat == 0)
            {
                this.icon_state = "" + Lang13.Initial(this, "icon_state");
                this.Attach(target);
            }
            return(false);
        }
Exemplo n.º 28
0
        // Function from file: other_reagents.dm
        public override bool on_mob_life(dynamic M = null)
        {
            ByTable possible_morphs = null;
            dynamic type            = null;
            dynamic S        = null;
            dynamic mutation = null;

            base.on_mob_life((object)(M));
            M.WriteMsg("<span class='warning'><b>You crumple in agony as your flesh wildly morphs into new forms!</b></span>");
            ((Ent_Static)M).visible_message("<b>" + M + "</b> falls to the ground and screams as their skin bubbles and froths!");
            ((Mob)M).Weaken(3);
            Task13.Schedule(30, (Task13.Closure)(() => {
                if (!Lang13.Bool(M) || Lang13.Bool(GlobalFuncs.qdeleted(M)))
                {
                    return;
                }
                possible_morphs = new ByTable();

                foreach (dynamic _a in Lang13.Enumerate(Lang13.GetTypes(typeof(Species)) - typeof(Species)))
                {
                    type = _a;

                    S = type;

                    if (Lang13.Bool(Lang13.Initial(S, "blacklisted")))
                    {
                        continue;
                    }
                    possible_morphs.Add(S);
                }
                mutation = Rand13.PickFromTable(possible_morphs);

                if (Rand13.PercentChance(90) && Lang13.Bool(mutation) && M.dna.species != typeof(Species_Golem) && M.dna.species != typeof(Species_Golem_Adamantine))
                {
                    M.WriteMsg("<span class='danger'>The pain subsides. You feel... different.</span>");
                    ((Mob)M).set_species(mutation);

                    if (mutation.id == "slime")
                    {
                        M.faction |= "slime";
                    }
                    else
                    {
                        M.faction -= "slime";
                    }
                }
                else
                {
                    M.WriteMsg("<span class='danger'>The pain vanishes suddenly. You feel no different.</span>");
                }
                return;
            }));
            return(true);
        }
Exemplo n.º 29
0
        // Function from file: crates.dm
        public override bool update_icon(dynamic new_state = null, dynamic new_icon = null, int?new_px = null, int?new_py = null)
        {
            this.icon_state = "" + Lang13.Initial(this, "icon_state") + (this.opened ? "open" : "");
            this.overlays.Cut();

            if (this.manifest != null)
            {
                this.overlays.Add("manifest");
            }
            return(false);
        }
Exemplo n.º 30
0
 // Function from file: lighting.dm
 public void fix(  )
 {
     if (this.status == 0)
     {
         return;
     }
     this.status     = 0;
     this.brightness = Lang13.Initial(this, "brightness");
     this.on         = true;
     this.update();
     return;
 }