New precepts should not add thoughts to children

This commit is contained in:
amevarashi 2022-10-29 15:23:25 +05:00
parent d483924c47
commit bf7f6a29fb
6 changed files with 12 additions and 6 deletions

View File

@ -22,7 +22,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
protected override ThoughtState ShouldHaveThought(Pawn p)
{
if (p != null && Genital_Helper.get_AllPartsHediffList(p).Count > 0)
if (p?.DevelopmentalStage == DevelopmentalStage.Adult && Genital_Helper.get_AllPartsHediffList(p).Count > 0)
{
float bestSize = IdeoUtility.GetGenitalSize(p);
return ThoughtState.ActiveAtStage(StageFromValue.GetStageIndex(bestSize));

View File

@ -23,7 +23,9 @@ namespace RJWSexperience.Ideology.PreceptWorkers
// Important Note: For the Social Worker, we measure otherPawns genitalia
protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
{
if (otherPawn != null && Genital_Helper.get_AllPartsHediffList(otherPawn).Count > 0)
if (otherPawn?.DevelopmentalStage == DevelopmentalStage.Adult &&
p?.DevelopmentalStage == DevelopmentalStage.Adult &&
Genital_Helper.get_AllPartsHediffList(otherPawn).Count > 0)
{
float bestSize = IdeoUtility.GetGenitalSize(otherPawn);
return ThoughtState.ActiveAtStage(StageFromValue.GetStageIndex(bestSize));

View File

@ -15,7 +15,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
/// <returns></returns>
protected override ThoughtState ShouldHaveThought(Pawn p)
{
return PregnancyHelper.GetPregnancy(p)?.Visible != true;
return p?.DevelopmentalStage == DevelopmentalStage.Adult && PregnancyHelper.GetPregnancy(p)?.Visible != true;
}
}
}

View File

@ -16,7 +16,9 @@ namespace RJWSexperience.Ideology.PreceptWorkers
/// <returns></returns>
protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
{
return PregnancyHelper.GetPregnancy(otherPawn)?.Visible != true;
return otherPawn?.DevelopmentalStage == DevelopmentalStage.Adult &&
p?.DevelopmentalStage == DevelopmentalStage.Adult &&
PregnancyHelper.GetPregnancy(otherPawn)?.Visible != true;
}
}
}

View File

@ -15,7 +15,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
/// <returns></returns>
protected override ThoughtState ShouldHaveThought(Pawn p)
{
return PregnancyHelper.GetPregnancy(p)?.Visible == true;
return p?.DevelopmentalStage == DevelopmentalStage.Adult && PregnancyHelper.GetPregnancy(p)?.Visible == true;
}
}
}

View File

@ -16,7 +16,9 @@ namespace RJWSexperience.Ideology.PreceptWorkers
/// <returns></returns>
protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
{
return PregnancyHelper.GetPregnancy(otherPawn)?.Visible == true;
return otherPawn?.DevelopmentalStage == DevelopmentalStage.Adult &&
p?.DevelopmentalStage == DevelopmentalStage.Adult &&
PregnancyHelper.GetPregnancy(otherPawn)?.Visible == true;
}
}
}