mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Fix futanari impregnation
This commit is contained in:
parent
d5d5dbd77c
commit
b7267e614c
1 changed files with 34 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
using HarmonyLib;
|
||||
using rjw;
|
||||
using rjw.Modules.Interactions.Enums;
|
||||
using rjw.Modules.Interactions.Objects;
|
||||
using Verse;
|
||||
using UnityEngine;
|
||||
|
||||
|
@ -19,6 +21,8 @@ namespace RJW_Menstruation
|
|||
|
||||
if (partner.IsAnimal() && !Configurations.EnableAnimalCycle) return true;
|
||||
|
||||
if (!InteractionCanCausePregnancy(props)) return false;
|
||||
|
||||
var pawnparts = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn));
|
||||
|
||||
HediffComp_Menstruation comp = partner.GetMenstruationComp();
|
||||
|
@ -39,6 +43,36 @@ namespace RJW_Menstruation
|
|||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if pregnancy can happen based on the interaction def
|
||||
/// This is needed for futanari sex, but should work for everyone
|
||||
/// </summary>
|
||||
/// <param name="props"></param>
|
||||
/// <returns>Interaction can result in pregnancy</returns>
|
||||
private static bool InteractionCanCausePregnancy(SexProps props)
|
||||
{
|
||||
InteractionWithExtension interaction = rjw.Modules.Interactions.Helpers.InteractionHelper.GetWithExtension(props.dictionaryKey);
|
||||
|
||||
if (!interaction.HasInteractionTag(InteractionTag.Fertilization))
|
||||
return false;
|
||||
|
||||
bool usesPawnsPenis;
|
||||
bool usesPartnersVagina;
|
||||
|
||||
if (!props.isReceiver)
|
||||
{
|
||||
usesPawnsPenis = interaction.DominantHasTag(GenitalTag.CanPenetrate);
|
||||
usesPartnersVagina = interaction.SubmissiveHasFamily(GenitalFamily.Vagina);
|
||||
}
|
||||
else
|
||||
{
|
||||
usesPawnsPenis = interaction.SubmissiveHasTag(GenitalTag.CanPenetrate);
|
||||
usesPartnersVagina = interaction.DominantHasFamily(GenitalFamily.Vagina);
|
||||
}
|
||||
|
||||
return usesPawnsPenis && usesPartnersVagina;
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(PregnancyHelper), "Doimpregnate")]
|
||||
|
|
Loading…
Reference in a new issue