mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2024-08-15 00:43:19 +00:00
Fixed biotech pregnancy not counting for pregnancy precepts
This commit is contained in:
parent
450c835d2b
commit
b6942e3c10
6 changed files with 18 additions and 8 deletions
|
@ -80,5 +80,18 @@ namespace RJWSexperience.Ideology
|
|||
|
||||
return bestSeenSize;
|
||||
}
|
||||
|
||||
public static bool IsVisiblyPregnant(Pawn pawn)
|
||||
{
|
||||
Hediff pregnancy = PregnancyHelper.GetPregnancy(pawn);
|
||||
|
||||
// Currently RJW does not check Biotech pregnancy
|
||||
if (pregnancy == null && VariousDefOf.PregnantHuman != null)
|
||||
{
|
||||
pregnancy = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PregnantHuman);
|
||||
}
|
||||
|
||||
return pregnancy?.Visible == true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using RimWorld;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience.Ideology.PreceptWorkers
|
||||
|
@ -15,7 +14,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
|
|||
/// <returns></returns>
|
||||
protected override ThoughtState ShouldHaveThought(Pawn p)
|
||||
{
|
||||
return p?.DevelopmentalStage == DevelopmentalStage.Adult && PregnancyHelper.GetPregnancy(p)?.Visible != true;
|
||||
return p?.DevelopmentalStage == DevelopmentalStage.Adult && !IdeoUtility.IsVisiblyPregnant(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using RimWorld;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience.Ideology.PreceptWorkers
|
||||
|
@ -18,7 +17,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
|
|||
{
|
||||
return otherPawn?.DevelopmentalStage == DevelopmentalStage.Adult &&
|
||||
p?.DevelopmentalStage == DevelopmentalStage.Adult &&
|
||||
PregnancyHelper.GetPregnancy(otherPawn)?.Visible != true;
|
||||
!IdeoUtility.IsVisiblyPregnant(otherPawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using RimWorld;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience.Ideology.PreceptWorkers
|
||||
|
@ -15,7 +14,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
|
|||
/// <returns></returns>
|
||||
protected override ThoughtState ShouldHaveThought(Pawn p)
|
||||
{
|
||||
return p?.DevelopmentalStage == DevelopmentalStage.Adult && PregnancyHelper.GetPregnancy(p)?.Visible == true;
|
||||
return p?.DevelopmentalStage == DevelopmentalStage.Adult && IdeoUtility.IsVisiblyPregnant(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using RimWorld;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience.Ideology.PreceptWorkers
|
||||
|
@ -18,7 +17,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
|
|||
{
|
||||
return otherPawn?.DevelopmentalStage == DevelopmentalStage.Adult &&
|
||||
p?.DevelopmentalStage == DevelopmentalStage.Adult &&
|
||||
PregnancyHelper.GetPregnancy(otherPawn)?.Visible == true;
|
||||
IdeoUtility.IsVisiblyPregnant(otherPawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,5 +22,6 @@ namespace RJWSexperience.Ideology
|
|||
[MayRequireIdeology] public static readonly PreceptDef Submissive_Male;
|
||||
[MayRequireIdeology] public static readonly PreceptDef Submissive_Female;
|
||||
[MayRequireIdeology] public static readonly PreceptDef ProselyzingByOrgasm;
|
||||
[MayRequireBiotech] public static readonly HediffDef PregnantHuman;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue