Beispiel #1
0
        internal static void QualityGenerationData()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine("Qualities of items/buildings generated from various sources");
            stringBuilder.AppendLine("---------------------------------------------------------------------");
            stringBuilder.AppendLine("Rewards (quests, etc...? )");
            stringBuilder.AppendLine(QualityUtility.DebugQualitiesString(() => QualityUtility.GenerateQualityReward()));
            stringBuilder.AppendLine("Trader items");
            stringBuilder.AppendLine(QualityUtility.DebugQualitiesString(() => QualityUtility.GenerateQualityTraderItem()));
            stringBuilder.AppendLine("Map generation items and buildings (usually NPC bases)");
            stringBuilder.AppendLine(QualityUtility.DebugQualitiesString(() => QualityUtility.GenerateQualityBaseGen()));
            stringBuilder.AppendLine("Gifts");
            stringBuilder.AppendLine(QualityUtility.DebugQualitiesString(() => QualityUtility.GenerateQualityGift()));
            using (IEnumerator <PawnKindDef> enumerator = (from k in DefDatabase <PawnKindDef> .AllDefs
                                                           orderby k.combatPower
                                                           select k).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    PawnKindDef pk = enumerator.Current;
                    if (pk.RaceProps.Humanlike)
                    {
                        stringBuilder.AppendLine(string.Concat(new object[]
                        {
                            "Items generated to equip pawn kind: ",
                            pk.defName,
                            " (",
                            pk.combatPower.ToString("F0"),
                            " points, itemQuality ",
                            pk.itemQuality,
                            ")"
                        }));
                        stringBuilder.Append(QualityUtility.DebugQualitiesString(() => QualityUtility.GenerateQualityGeneratingPawn(pk)));
                        stringBuilder.AppendLine();
                    }
                }
            }
            int level;

            for (level = 0; level <= 20; level++)
            {
                stringBuilder.AppendLine();
                stringBuilder.AppendLine("Items/buildings made by crafter/builder at skill level " + level);
                stringBuilder.Append(QualityUtility.DebugQualitiesString(() => QualityUtility.GenerateQualityCreatedByPawn(level, false)));
            }
            Log.Message(stringBuilder.ToString(), false);
        }
        public static QualityCategory GenerateQuality(QualityGenerator qualityGenerator)
        {
            switch (qualityGenerator)
            {
            case QualityGenerator.BaseGen:
                return(QualityUtility.GenerateQualityBaseGen());

            case QualityGenerator.Reward:
                return(QualityUtility.GenerateQualityReward());

            case QualityGenerator.Gift:
                return(QualityUtility.GenerateQualityGift());

            default:
                throw new NotImplementedException(qualityGenerator.ToString());
            }
        }
Beispiel #3
0
 private static QualityCategory <QualityGenerationData> m__3()
 {
     return(QualityUtility.GenerateQualityGift());
 }