mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2024-08-15 00:43:19 +00:00
Optimized incest checks
This commit is contained in:
parent
7107947cac
commit
7e30ebe68e
2 changed files with 7 additions and 2 deletions
|
@ -11,6 +11,11 @@ namespace RJWSexperience.Ideology
|
|||
/// </summary>
|
||||
public static BloodRelationDegree GetBloodRelationDegree(Pawn pawn, Pawn partner)
|
||||
{
|
||||
if (!pawn.relations.FamilyByBlood.Contains(partner))
|
||||
{
|
||||
return BloodRelationDegree.NotRelated;
|
||||
}
|
||||
|
||||
PawnRelationDef closestBloodRelation = pawn
|
||||
.GetRelations(partner)
|
||||
?.Where(def => def.familyByBloodRelation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue