public string[] View() { StringBuilder stringBuilder = new StringBuilder(); List <string> view = new List <string>(); view.Add(Name); view.Add(""); view.Add(Description); view.Add(""); if (Exits.Any()) { stringBuilder.Append("Exits: " + Function.GetNames(Exits.ToArray())); view.Add(stringBuilder.ToString()); stringBuilder.Clear(); } if (Mobs.Any()) { stringBuilder.Append("Mobs: " + Function.GetNames(Mobs.ToArray())); view.Add(stringBuilder.ToString()); stringBuilder.Clear(); } if (Players.Any()) { stringBuilder.Append("Players: " + Function.GetNames(Players.ToArray())); view.Add(stringBuilder.ToString()); stringBuilder.Clear(); } if (Items.Any()) { // items on floor; need to search for duplicates, pronouns, etc., and display them in friendly grammar form // You see (an) orange, 23 pumpkin seed(s), (a) hungry cat, Toetag('s) nose. } return(view.ToArray()); }
public void RemoveMobs() { foreach (Mobile target in Mobs.ToArray()) { target.Delete(); } if (Boss != null) { Boss.Delete(); } if (Anim1 != null) { Anim1.Delete(); } if (Anim2 != null) { Anim2.Delete(); } Mobs.Clear(); Mobs.TrimExcess(); }
public string GetMobs() { return(Function.GetNames(Mobs.ToArray())); }