Пример #1
0
 // Function from file: simple_animal.dm
 public override dynamic Destroy(  )
 {
     if (this.nest != null)
     {
         this.nest.spawned_mobs.Remove(this);
     }
     this.nest = null;
     return(base.Destroy());
 }
Пример #2
0
        // Function from file: simple_animal.dm
        public override bool death(bool?gibbed = null, bool?toast = null)
        {
            dynamic i = null;


            if (this.nest != null)
            {
                this.nest.spawned_mobs.Remove(this);
                this.nest = null;
            }

            if (this.loot.len != 0)
            {
                foreach (dynamic _a in Lang13.Enumerate(this.loot))
                {
                    i = _a;

                    Lang13.Call(i, this.loc);
                }
            }

            if (Lang13.Bool(this.deathmessage) && !(gibbed == true))
            {
                this.visible_message("<span class='danger'>" + this.deathmessage + "</span>");
            }
            else if (!this.del_on_death)
            {
                this.visible_message(new Txt("<span class='danger'>").the(this).item().str(" stops moving...</span>").ToString());
            }

            if (this.del_on_death)
            {
                this.ghostize();
                GlobalFuncs.qdel(this);
            }
            else
            {
                this.health     = 0;
                this.icon_state = this.icon_dead;
                this.stat       = 2;
                this.density    = false;
            }
            base.death(gibbed, toast);
            return(false);
        }