public static void pubertyChest(Pawn pawn, float severity, RacePubertySetting pubertySettings)
        {
            intialChest(pawn);

            if (Rand.Value > .1f)
            {
                return;
            }
            if (pawn.health.hediffSet.hediffs.Any(pubertySettings.hasTestes))
            {
                //more pec
                MoreChest(pawn, HediffDefOf.LifeStages_Pecs);
            }
            else
            {
                float boobGrowthChance = 0.05f;
                if (PubertyHelper.RelaventHeDiffs(pubertySettings, pawn.health.hediffSet).Any())
                {
                    //ovaries keep pumping
                    boobGrowthChance = .5f;
                }

                if (Rand.Value < boobGrowthChance)
                {
                    //more boob
                    MoreChest(pawn, HediffDefOf.LifeStages_Breasts);
                }
            }
        }
        private static void DoPuberty(Pawn pawn, BodyPartRecord maturityPart)
        {
            for (var i = SplitsForPuberty; i > 0; i--)
            {
                PubertyHelper.applyPubertyDay(pawn, 1f * i / SplitsForPuberty);
            }

            pawn.health.AddHediff(HediffDefOf.LifeStages_Adult, maturityPart);
        }
Exemple #3
0
        public override float CalculateCapacityLevel(HediffSet diffSet,
                                                     List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            var basis = PawnCapacityUtility.CalculateTagEfficiency(diffSet,
                                                                   BodyPartTagDefOf.FertilitySource, 3.40282347E+38f, default(FloatRange), impactors);

            RacePubertySetting pubertySettings = SettingHelper.latest.GetPubertySettingsFor(diffSet.pawn.def);

            return(PubertyHelper.getFactorFertility(pubertySettings, diffSet) * basis * PubertyHelper.isPostPubescence(diffSet));
        }
        private bool pubertyFeels(Pawn pawn)
        {
            if (!pawn.IsHashIntervalTick(20000))
            {
                return(lastStatus);
            }

            lastStatus = Rand.Bool;

            //puberty tick time
            PubertyHelper.applyPubertyDay(pawn,
                                          pawn.health.hediffSet.hediffs.First(x => x.def == HediffDefOf.LifeStages_Puberty).Severity);

            return(lastStatus);
        }