Example #1
0
        private static string get_values(string[] array)
        {
            int _number = NPCBuilder.get_number();
            BinarySearchTree <string> binarySearchTree = new BinarySearchTree <string>();

            while (binarySearchTree.Count != _number)
            {
                string str = array[Session.Random.Next((int)array.Length)];
                binarySearchTree.Add(str);
            }
            List <string> sortedList = binarySearchTree.SortedList;
            string        str1       = "";

            foreach (string str2 in sortedList)
            {
                if (str1 != "")
                {
                    str1 = (str2 != sortedList[sortedList.Count - 1] ? string.Concat(str1, ", ") : string.Concat(str1, " and "));
                }
                str1 = string.Concat(str1, str2);
            }
            if (str1 != "")
            {
                str1 = TextHelper.Capitalise(str1, false);
            }
            return(str1);
        }
Example #2
0
 public static string Speech()
 {
     return(NPCBuilder.get_values(NPCBuilder.fSpeech));
 }
Example #3
0
 public static string Physical()
 {
     return(NPCBuilder.get_values(NPCBuilder.fPhysical));
 }
Example #4
0
 public static string Personality()
 {
     return(NPCBuilder.get_values(NPCBuilder.fMental));
 }