Beispiel #1
0
        public static void LogDescriptionsTaleless()
        {
            List <Tale> list = new List <Tale>();

            for (int i = 0; i < 20; i++)
            {
                list.Add(null);
            }
            TaleTester.LogTales(list);
        }
Beispiel #2
0
        public static void LogSpecificTale(TaleDef def, int count)
        {
            List <Tale> list = new List <Tale>();

            for (int i = 0; i < count; i++)
            {
                list.Add(TaleFactory.MakeRandomTestTale(def));
            }
            TaleTester.LogTales(list);
        }
Beispiel #3
0
        public static void LogGeneratedTales(int count)
        {
            List <Tale> list = new List <Tale>();

            for (int i = 0; i < count; i++)
            {
                list.Add(TaleFactory.MakeRandomTestTale(null));
            }
            TaleTester.LogTales(list);
        }
Beispiel #4
0
        private static void LogTales(IEnumerable <Tale> tales)
        {
            StringBuilder stringBuilder = new StringBuilder();
            int           num           = 0;

            foreach (Tale current in tales)
            {
                TaleReference tr = new TaleReference(current);
                stringBuilder.AppendLine(TaleTester.RandomArtworkName(tr));
                stringBuilder.AppendLine(TaleTester.RandomArtworkDescription(tr));
                stringBuilder.AppendLine();
                num++;
                if (num % 20 == 0)
                {
                    Log.Message(stringBuilder.ToString());
                    stringBuilder = new StringBuilder();
                }
            }
            if (!stringBuilder.ToString().NullOrEmpty())
            {
                Log.Message(stringBuilder.ToString());
            }
        }
Beispiel #5
0
 public static void LogTalesInDatabase()
 {
     TaleTester.LogTales(from t in Find.TaleManager.AllTalesListForReading
                         where t.def.usableForArt
                         select t);
 }