mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2026-06-18 19:25:59 +00:00
31 lines
840 B
C#
31 lines
840 B
C#
using RimWorld;
|
|
using rjw;
|
|
using System.Linq;
|
|
using Verse;
|
|
|
|
namespace RJWSexperience.Ideology.PreceptWorkers
|
|
{
|
|
public class ThoughtWorker_Precept_BestialBreeding : ThoughtWorker_Precept
|
|
{
|
|
protected override ThoughtState ShouldHaveThought(Pawn p)
|
|
{
|
|
if (p?.DevelopmentalStage == DevelopmentalStage.Adult)
|
|
{
|
|
Map map = p.Map;
|
|
if (map != null)
|
|
{
|
|
foreach (var pawnOnMap in map.mapPawns.AllPawns.Where(x => xxx.is_animal(x) && PawnExtensions.IsVisiblyPregnant(x)))
|
|
{
|
|
if (pawnOnMap != p && IdeoUtility.IsFatherOfPregnancy(pawnOnMap, p)) // Check if this pawn is the father of p
|
|
{
|
|
return ThoughtState.ActiveDefault; // Active thought if the pawn is the father
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Return default (inactive) if no valid conditions were met
|
|
return ThoughtState.Inactive;
|
|
}
|
|
}
|
|
}
|