Exemplo n.º 1
0
        private static ThingDef GenerateMutationGenome([NotNull] MutationCategoryDef mDef)
        {
            var tDef = new ThingDef
            {
                defName                 = GENOME_PREAMBLE + mDef.defName + "_Implicit",
                label                   = LABEL_TTAG.Translate(mDef.Named("MUTATION")),
                description             = GetGenomeDesc(mDef),
                resourceReadoutPriority = ResourceCountPriority.Middle,
                category                = ThingCategory.Item,
                thingClass              = typeof(ThingWithComps),
                thingCategories         = new List <ThingCategoryDef> {
                    PMThingCategoryDefOf.PM_MutationGenome
                },
                graphicData       = GenerateGenomeGraphicData(mDef),
                useHitPoints      = true,
                selectable        = true,
                thingSetMakerTags = new List <string> {
                    GENOME_SET_MAKER_TAG
                },
                altitudeLayer  = AltitudeLayer.Item,
                tickerType     = TickerType.Never,
                rotatable      = false,
                pathCost       = 15,
                drawGUIOverlay = true,
                modContentPack = mDef.modContentPack,
                tradeTags      = new List <string> {
                    GENOME_TRADER_TAGS
                }
            };

            SetGenomeStats(tDef, mDef);
            AddComps(tDef, mDef);

            return(tDef);
        }
Exemplo n.º 2
0
 private static string GetGenomeDesc([NotNull] MutationCategoryDef mDef)
 {
     if (!string.IsNullOrEmpty(mDef.customGenomeDescription))
     {
         return(mDef.customGenomeDescription);
     }
     return(GENOME_DESC_TAG.Translate(mDef.Named("MUTATION")));
 }
Exemplo n.º 3
0
        private static ThingDef GenerateMutationGenome([NotNull] MutationCategoryDef mDef)
        {
            string      desc  = GetGenomeDesc(mDef);
            string      label = LABEL_TTAG.Translate(mDef.Named("MUTATION"));
            GraphicData gData = GenerateGenomeGraphicData(mDef);
            ThingDef    tDef  = GenerateNewDef(mDef, desc, label, gData);

            SetGenomeStats(tDef, mDef);
            AddComps(tDef, mDef);

            return(tDef);
        }