RJW 5.3.9 fixes the condom code, but might as well keep the new function

This commit is contained in:
lutepickle 2024-04-01 10:53:10 -07:00
parent 18af2fc24c
commit 06cc59378c
3 changed files with 1 additions and 5 deletions

View File

@ -244,7 +244,6 @@ namespace RJW_Menstruation
isInduced &&
comp.Pawn.jobs.curDriver is JobDriver_Sex job &&
job.Sexprops != null &&
//!job.Sexprops.usedCondom &&
!UsingCondom(comp.Pawn, job.Partner) &&
(job.Sexprops.sexType == xxx.rjwSextype.Vaginal || job.Sexprops.sexType == xxx.rjwSextype.DoublePenetration))
ovulatoryProgress = 0.0f;
@ -468,7 +467,6 @@ namespace RJW_Menstruation
return damage.totalDamageDealt;
}
// RJW only sets usedCondom on the sexprops of the initiator, so work around that by checking for either pawn having it set
public static bool UsingCondom(Pawn pawn, Pawn partner)
{
return

View File

@ -36,7 +36,7 @@ namespace RJW_Menstruation
if (Genital_Helper.has_penis_fertile(pawn, pawnparts) && PregnancyHelper.CanImpregnate(pawn, partner, sextype))
{
if (MenstruationUtility.UsingCondom(pawn, partner)) return false; // Shouldn't be needed, but RJW has a bug in the condom checks
if (MenstruationUtility.UsingCondom(pawn, partner)) return false; // Probably unnecessary
PregnancyHelper.DoImpregnate(pawn, partner);
return false;
@ -344,7 +344,6 @@ namespace RJW_Menstruation
xxx.rjwSextype sextype = __instance.Sexprops.sexType;
if (!(target is Pawn partner)) return;
if (sextype != xxx.rjwSextype.Vaginal && sextype != xxx.rjwSextype.DoublePenetration) return;
//if (__instance.Sexprops.usedCondom) return;
if (MenstruationUtility.UsingCondom(pawn, partner)) return;
if (AndroidsCompatibility.IsAndroid(pawn)) return;
if (!Impregnate_Patch.InteractionCanCausePregnancy(__instance.Sexprops)) return;

View File

@ -1,6 +1,5 @@
Version 1.5.0.0
- Support for RimWorld 1.5. All future changes to Menstruation will only be for Rimworld 1.5.
- More reliably detect the usage of condoms.
Version 1.0.9.4
- Added graphics for the menstruation genes with thanks to Alpenglow.