mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Let about a third of penises precum during sex
This commit is contained in:
parent
70d65d379c
commit
def93aa218
4 changed files with 43 additions and 11 deletions
Binary file not shown.
|
@ -737,11 +737,11 @@ namespace RJW_Menstruation
|
||||||
/// <param name="pawn"></param>
|
/// <param name="pawn"></param>
|
||||||
/// <param name="volume"></param>
|
/// <param name="volume"></param>
|
||||||
/// <param name="fertility"></param>
|
/// <param name="fertility"></param>
|
||||||
/// <param name="filthdef"></param>
|
/// <param name="precum"></param>
|
||||||
public void CumIn(Pawn pawn, float volume, float fertility = 1.0f, ThingDef filthdef = null)
|
public void CumIn(Pawn pawn, float volume, float fertility = 1.0f, bool precum = false)
|
||||||
{
|
{
|
||||||
if (volume <= 0) return;
|
if (volume <= 0) return;
|
||||||
if (fertility > 0 && IsDangerDay && pawn.relations.GetPregnancyApproachForPartner(Pawn) == PregnancyApproach.AvoidPregnancy)
|
if (!precum && fertility > 0 && IsDangerDay && pawn.relations.GetPregnancyApproachForPartner(Pawn) == PregnancyApproach.AvoidPregnancy)
|
||||||
{
|
{
|
||||||
float successChance = pulloutSuccessRate;
|
float successChance = pulloutSuccessRate;
|
||||||
if (pawn.Has(Quirk.ImpregnationFetish)) successChance *= fetishPulloutSuccessModifier;
|
if (pawn.Has(Quirk.ImpregnationFetish)) successChance *= fetishPulloutSuccessModifier;
|
||||||
|
@ -759,12 +759,12 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
if (cum.pawn.Equals(pawn))
|
if (cum.pawn.Equals(pawn))
|
||||||
{
|
{
|
||||||
cum.MergeWithCum(volume, fertility, filthdef);
|
cum.MergeWithCum(volume, fertility);
|
||||||
merged = true;
|
merged = true;
|
||||||
}
|
}
|
||||||
cum.DismishForce(cumoutrate);
|
cum.DismishForce(cumoutrate);
|
||||||
}
|
}
|
||||||
if (!merged) cums.Add(new Cum(pawn, volume * (1 - cumoutrate), fertility, filthdef));
|
if (!merged) cums.Add(new Cum(pawn, volume * (1 - cumoutrate), fertility));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -774,17 +774,20 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
if (cum.pawn.Equals(pawn))
|
if (cum.pawn.Equals(pawn))
|
||||||
{
|
{
|
||||||
cum.MergeWithCum(volume, fertility, filthdef);
|
cum.MergeWithCum(volume, fertility);
|
||||||
merged = true;
|
merged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!merged) cums.Add(new Cum(pawn, volume, fertility, filthdef));
|
if (!merged) cums.Add(new Cum(pawn, volume, fertility));
|
||||||
}
|
}
|
||||||
cumd = TotalCumPercent - cumd;
|
cumd = TotalCumPercent - cumd;
|
||||||
|
|
||||||
Pawn.records.AddTo(VariousDefOf.AmountofCreampied, volume);
|
if (!precum)
|
||||||
AfterCumIn(pawn);
|
{
|
||||||
AfterFluidIn(cumd);
|
Pawn.records.AddTo(VariousDefOf.AmountofCreampied, volume);
|
||||||
|
AfterCumIn(pawn);
|
||||||
|
AfterFluidIn(cumd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace RJW_Menstruation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="props"></param>
|
/// <param name="props"></param>
|
||||||
/// <returns>Interaction can result in pregnancy</returns>
|
/// <returns>Interaction can result in pregnancy</returns>
|
||||||
private static bool InteractionCanCausePregnancy(SexProps props)
|
public static bool InteractionCanCausePregnancy(SexProps props)
|
||||||
{
|
{
|
||||||
InteractionWithExtension interaction = rjw.Modules.Interactions.Helpers.InteractionHelper.GetWithExtension(props.dictionaryKey);
|
InteractionWithExtension interaction = rjw.Modules.Interactions.Helpers.InteractionHelper.GetWithExtension(props.dictionaryKey);
|
||||||
|
|
||||||
|
@ -331,6 +331,34 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(JobDriver_Sex), nameof(JobDriver_Sex.SexTick))]
|
||||||
|
public static class SexTick_Patch
|
||||||
|
{
|
||||||
|
private const float fertilePrecummersPercentage = 0.33f;
|
||||||
|
private const float precumRatio = 0.1f; // Relative to ejaculation volume
|
||||||
|
private const float precumFertility = 0.5f;
|
||||||
|
private const float expectedDurationTicks = 2000f * (0.9f - 0.5f) / 2;
|
||||||
|
|
||||||
|
public static void Postfix(JobDriver_Sex __instance, Pawn pawn, Thing target)
|
||||||
|
{
|
||||||
|
if (!pawn.IsHashIntervalTick(__instance.ticks_between_thrusts)) return;
|
||||||
|
xxx.rjwSextype sextype = __instance.Sexprops.sexType;
|
||||||
|
if (!(target is Pawn partner) || pawn == partner) return;
|
||||||
|
if (sextype != xxx.rjwSextype.Vaginal && sextype != xxx.rjwSextype.DoublePenetration) return;
|
||||||
|
if (__instance.Sexprops.usedCondom) return;
|
||||||
|
if (!Impregnate_Patch.InteractionCanCausePregnancy(__instance.Sexprops)) return;
|
||||||
|
|
||||||
|
// Archotech penises have more control. Or something.
|
||||||
|
CompHediffBodyPart penisComp = pawn.GetGenitalsList()?.Find(genital => (genital as Hediff_PartBaseNatural)?.def.defName.ToLower().Contains("penis") ?? false)?.TryGetComp<CompHediffBodyPart>();
|
||||||
|
if (penisComp == null || Rand.ChanceSeeded(1.0f - fertilePrecummersPercentage, Gen.HashOffset(penisComp.parent.loadID))) return;
|
||||||
|
HediffComp_Menstruation vaginaComp = partner.GetRandomMenstruationComp();
|
||||||
|
if (vaginaComp == null) return;
|
||||||
|
|
||||||
|
float precumAmount = pawn.GetCumVolume(penisComp) * precumRatio * __instance.ticks_between_thrusts / expectedDurationTicks;
|
||||||
|
vaginaComp.CumIn(pawn, precumAmount, pawn.SterileGenes() ? 0.0f : precumFertility * pawn.health.capacities.GetLevel(xxx.reproduction), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HarmonyPatch(typeof(CompHediffBodyPart), nameof(CompHediffBodyPart.updatesize))]
|
[HarmonyPatch(typeof(CompHediffBodyPart), nameof(CompHediffBodyPart.updatesize))]
|
||||||
public static class Updatesize_Patch
|
public static class Updatesize_Patch
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,7 @@ Version 1.0.8.5
|
||||||
- Added biosculpter recipe to restore 1 year's worth of eggs.
|
- Added biosculpter recipe to restore 1 year's worth of eggs.
|
||||||
- Vaginal sex with the "avoid pregnancy" relation will (usually) pull out prevent cum from entering the womb if there's a risk of pregnancy.
|
- Vaginal sex with the "avoid pregnancy" relation will (usually) pull out prevent cum from entering the womb if there's a risk of pregnancy.
|
||||||
- Impregnation fetishists are significantly less likely to pull out.
|
- Impregnation fetishists are significantly less likely to pull out.
|
||||||
|
- Some males will release small amounts of semen into a womb during vaginal sex before their actual ejaculation.
|
||||||
- Babies born from multiple pregnancy will properly produce the prompt to name them.
|
- Babies born from multiple pregnancy will properly produce the prompt to name them.
|
||||||
|
|
||||||
Version 1.0.8.4
|
Version 1.0.8.4
|
||||||
|
|
Loading…
Reference in a new issue