Exemplo n.º 1
0
 public override void DirtyEffect()
 {
     if (wearhours > MinHrstoDirtyEffect && Rand.Chance(0.01f))
     {
         Wearer.health.AddHediff(HediffDefOf.WoundInfection, Genital_Helper.get_genitalsBPR(Wearer));
     }
 }
        public static Texture2D GetAnalIcon(this Pawn pawn)
        {
            var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault((Hediff h) => h.def.defName.ToLower().Contains("anus"));

            if (hediff != null)
            {
                CompProperties_Anus Props = (CompProperties_Anus)hediff.TryGetComp <HediffComp_Anus>()?.props;
                string icon;
                if (Props != null)
                {
                    icon = Props.analTex ?? "Genitals/Anal";
                }
                else
                {
                    icon = "Genitals/Anal";
                }
                if (hediff.Severity < 0.20f)
                {
                    icon += "00";                                 //micro
                }
                else if (hediff.Severity < 0.40f)
                {
                    icon += "01";                                 //tight
                }
                else if (hediff.Severity < 0.60f)
                {
                    icon += "02";                                 //average
                }
                else if (hediff.Severity < 0.80f)
                {
                    icon += "03";                                 //accomodating
                }
                else if (hediff.Severity < 1.01f)
                {
                    icon += "04";                                 //cavernous
                }
                else
                {
                    icon += "05";                                 //abyssal
                }
                return(ContentFinder <Texture2D> .Get((icon), true));
            }
            else
            {
                return(ContentFinder <Texture2D> .Get(("Genitals/Anal00"), true));
            }
        }
        public override IEnumerable <BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
        {
            if (pawn.gender != Gender.Female)
            {
                yield break;
            }

            BodyPartRecord part = Genital_Helper.get_breastsBPR(pawn);

            if (part != null)
            {
                if (pawn.GetBreastComp() != null)
                {
                    yield return(part);
                }
            }
        }
Exemplo n.º 4
0
 static void AddDirectRelation_GiveLacrating(Pawn_RelationsTracker __instance, PawnRelationDef def, Pawn otherPawn)
 {
     if (def == PawnRelationDefOf.Parent)
     {
         Pawn pawn   = (Pawn)PawnFI.GetValue(__instance);
         Pawn mother = pawn.GetMother();
         //Log.Message("mother : " + pawn.LabelIndefinite());
         if (pawn.ageTracker.CurLifeStageIndex == AgeStage.Baby && mother == otherPawn)
         {
             if (mother.RaceProps.Humanlike && !mother.health.hediffSet.HasHediff(HediffDef.Named("Lactating")))
             {
                 if (AnotherModCheck.RJW_On)
                 {
                     try
                     {
                         ((Action)(() =>
                         {
                             if (Genital_Helper.has_breasts(mother))
                             {
                                 mother.health.AddHediff(HediffDef.Named("Lactating"), ChildrenUtility.GetPawnBodyPart(mother, "Chest"), null);
                             }
                             if (Genital_Helper.has_vagina(mother))
                             {
                                 mother.health.AddHediff(HediffDef.Named("BnC_RJW_PostPregnancy"), ChildrenUtility.GetPawnBodyPart(mother, "Genitals"), null);
                             }
                         }))();
                     }
                     catch (TypeLoadException)
                     {
                     }
                 }
                 else
                 {
                     mother.health.AddHediff(HediffDef.Named("Lactating"), ChildrenUtility.GetPawnBodyPart(mother, "Torso"), null);
                 }
             }
         }
     }
 }
Exemplo n.º 5
0
        public static bool Prefix(SexProps props)
        {
            xxx.rjwSextype sextype = props.sexType;
            Pawn           pawn    = props.pawn;
            Pawn           partner = props.partner;

            if (sextype == xxx.rjwSextype.Vaginal)
            {
                var pawnpartBPR    = Genital_Helper.get_genitalsBPR(pawn);
                var maleparts      = Genital_Helper.get_PartsHediffList(pawn, pawnpartBPR);
                var partnerpartBPR = Genital_Helper.get_genitalsBPR(partner);
                var femaleparts    = Genital_Helper.get_PartsHediffList(partner, partnerpartBPR);

                Pawn female = null, male = null;

                if (Genital_Helper.has_vagina(partner, femaleparts))
                {
                    female = partner;
                    male   = pawn;
                }
                else if (Genital_Helper.has_vagina(pawn, maleparts))
                {
                    female      = pawn;
                    femaleparts = maleparts;
                    male        = partner;
                    maleparts   = Genital_Helper.get_PartsHediffList(partner, partnerpartBPR);
                }
                else
                {
                    return(true);
                }

                if (female.IsAnimal() && !Configurations.EnableAnimalCycle)
                {
                    return(true);
                }
                HediffComp_Menstruation comp = female.GetMenstruationComp();
                if (comp != null)
                {
                    if (Genital_Helper.has_penis_fertile(male, maleparts) && PregnancyHelper.CanImpregnate(male, female, sextype))
                    {
                        PregnancyHelper.Doimpregnate(male, female);
                        return(false);
                    }
                    else if (Genital_Helper.has_ovipositorM(male, maleparts))
                    {
                        comp.CumIn(male, Rand.Range(0.5f, 3.0f) * RJWSettings.cum_on_body_amount_adjust * male.BodySize, 1.0f);
                    }
                    else
                    {
                        comp.CumIn(male, male.GetCumVolume(maleparts), 0);
                    }
                }

                //if (Genital_Helper.has_vagina(partner, partnerparts))
                //{
                //    if (partner.IsAnimal() && !Configurations.EnableAnimalCycle) return true;
                //    HediffComp_Menstruation comp = Utility.GetMenstruationComp(partner);
                //    if (comp != null)
                //    {
                //        if (Genital_Helper.has_penis_fertile(pawn, pawnparts) && PregnancyHelper.CanImpregnate(pawn, partner, sextype))
                //        {
                //            PregnancyHelper.Doimpregnate(pawn, partner);
                //            return false;
                //        }
                //        else comp.CumIn(pawn, pawn.GetCumVolume(), 0);
                //    }
                //}
                //else if (Genital_Helper.has_vagina(pawn, pawnparts))
                //{
                //    if (pawn.IsAnimal() && !Configurations.EnableAnimalCycle) return true;
                //    HediffComp_Menstruation comp = Utility.GetMenstruationComp(pawn);
                //    if (comp != null)
                //    {
                //        if (Genital_Helper.has_penis_fertile(partner, partnerparts) && PregnancyHelper.CanImpregnate(partner, pawn, sextype))
                //        {
                //            PregnancyHelper.Doimpregnate(partner, pawn);
                //            return false;
                //        }
                //        else comp.CumIn(partner, partner.GetCumVolume(), 0);
                //    }
                //}
            }
            return(true);
        }