mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
24 lines
681 B
C#
24 lines
681 B
C#
using RimWorld;
|
|
using Verse;
|
|
|
|
namespace RJWSexperience
|
|
{
|
|
public class PawnRelationWorker_Bastard : PawnRelationWorker_Child
|
|
{
|
|
public override bool InRelation(Pawn me, Pawn other)
|
|
{
|
|
if (!SexperienceMod.Settings.EnableBastardRelation)
|
|
return false;
|
|
|
|
Pawn mother = other.GetMother();
|
|
Pawn father = other.GetFather();
|
|
if (me != other && (mother == me || father == me))
|
|
{
|
|
if (mother == null || father == null) return true;
|
|
else if (mother.relations != null) return !(mother.relations.DirectRelationExists(PawnRelationDefOf.Spouse, father) || mother.relations.DirectRelationExists(PawnRelationDefOf.ExSpouse, father));
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|