Respect Biotech IUDs

This commit is contained in:
lutepickle 2022-11-04 12:06:03 -07:00
parent 742381dd54
commit 6fe38eb46e
4 changed files with 12 additions and 4 deletions

View file

@ -67,7 +67,7 @@ namespace RJW_Menstruation
{
get
{
if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false;
if (Pawn.HasIUD()) return false;
switch (curStage)
{

View file

@ -472,7 +472,7 @@ namespace RJW_Menstruation
{
get
{
if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false;
if (Pawn.HasIUD()) return false;
switch (curStage)
{
@ -739,7 +739,7 @@ namespace RJW_Menstruation
public void CumIn(Pawn pawn, float volume, float fertility = 1.0f, ThingDef filthdef = null)
{
if (volume <= 0) return;
if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) fertility /= 100f;
if (Pawn.HasIUD()) fertility /= 100f;
float cumd = TotalCumPercent;
float tmp = TotalCum + volume;
if (tmp > CumCapacity)
@ -852,7 +852,7 @@ namespace RJW_Menstruation
Hediff asa = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_ASA);
float asafactor = asa?.Severity ?? 0f;
if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) antisperm = 0.70f + asafactor;
if (Pawn.HasIUD()) antisperm = 0.70f + asafactor;
else antisperm = 0.0f + asafactor;
absorber = (Absorber)Pawn.apparel?.WornApparel?.Find(x => x is Absorber);

View file

@ -357,5 +357,12 @@ namespace RJW_Menstruation
return res;
}
public static bool HasIUD(this Pawn pawn)
{
if (pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return true;
if (ModsConfig.BiotechActive && pawn.health.hediffSet.HasHediff(HediffDefOf.ImplantedIUD)) return true;
return false;
}
}
}

View file

@ -3,6 +3,7 @@ Version 1.0.8.1
- Babies conceived through the multiple pregnancy option will now properly inherit xenotypes.
- Properly track biotech pregnancy through labor.
- Pawns that are genetically sterile will no longer produce fertile cum, nor have a menstrual cycle.
- Biotech IUDs will now reduce pregnancy chances the same as an RJW IUD. Using both will not stack.
- A biotech pregnancy will pause before going into labor if another womb already is in labor.
Version 1.0.8.0