Impregnation fetishists only prefer the ovulating

This commit is contained in:
lutepickle 2022-03-11 08:05:39 -08:00
parent 9da2c39d0e
commit 7387c0dfe9
2 changed files with 14 additions and 5 deletions

Binary file not shown.

View File

@ -77,10 +77,19 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(Quirk), "IsSatisfiedBy")]
public static class IsSatisfiedBy_Patch
{
public static void Postfix(Quirk __instance, ref bool __result, Pawn pawn, Pawn partner)
{
// This is stricter than can_impregnate, so quickly filter out scenarios that are negative anyways.
if (__result == false || __instance != Quirk.ImpregnationFetish) return;
__result =
((PregnancyHelper.CanImpregnate(pawn, partner) && (partner.GetMenstruationComp()?.IsDangerDay ?? true))
||
(PregnancyHelper.CanImpregnate(partner, pawn) && (pawn.GetMenstruationComp()?.IsDangerDay ?? true)));
return;
}
}
}