mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	merge
This commit is contained in:
		
							parent
							
								
									951085ec59
								
							
						
					
					
						commit
						25008ce5dc
					
				
					 48 changed files with 2345 additions and 59 deletions
				
			
		| 
						 | 
				
			
			@ -125,5 +125,43 @@ namespace RJW_Genes
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [HarmonyPrefix]
 | 
			
		||||
        [HarmonyPatch("SetFather")]
 | 
			
		||||
        private static bool SetFatherPrefix(Pawn pawn, Pawn newFather)
 | 
			
		||||
        {
 | 
			
		||||
            Pawn father = pawn.GetFather();
 | 
			
		||||
            if (father != newFather)
 | 
			
		||||
            {
 | 
			
		||||
                if (father != null)
 | 
			
		||||
                {
 | 
			
		||||
                    pawn.relations.RemoveDirectRelation(PawnRelationDefOf.Parent, father);
 | 
			
		||||
                }
 | 
			
		||||
                if (newFather != null)
 | 
			
		||||
                {
 | 
			
		||||
                    pawn.relations.AddDirectRelation(PawnRelationDefOf.Parent, newFather);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [HarmonyPrefix]
 | 
			
		||||
        [HarmonyPatch("SetMother")]
 | 
			
		||||
        private static bool SetMotherPrefix(Pawn pawn, Pawn newMother)
 | 
			
		||||
        {
 | 
			
		||||
            Pawn mother = pawn.GetMother();
 | 
			
		||||
            if (mother != newMother)
 | 
			
		||||
            {
 | 
			
		||||
                if (mother != null)
 | 
			
		||||
                {
 | 
			
		||||
                    pawn.relations.RemoveDirectRelation(PawnRelationDefOf.Parent, mother);
 | 
			
		||||
                }
 | 
			
		||||
                if (newMother != null)
 | 
			
		||||
                {
 | 
			
		||||
                    pawn.relations.AddDirectRelation(PawnRelationDefOf.Parent, newMother);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,6 +32,11 @@ namespace RJW_Genes
 | 
			
		|||
 | 
			
		||||
            Pawn giver = props.pawn; // orgasmer
 | 
			
		||||
            Pawn receiver = props.partner;
 | 
			
		||||
 | 
			
		||||
            if (receiver.genes == null)
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            Hediff vasectomy;
 | 
			
		||||
            receiver.health.hediffSet.TryGetHediff(vasectomydef, out vasectomy);
 | 
			
		||||
            
 | 
			
		||||
| 
						 | 
				
			
			@ -40,10 +45,7 @@ namespace RJW_Genes
 | 
			
		|||
            List<Hediff> pawnparts = giver.GetGenitalsList();
 | 
			
		||||
            List<Hediff> partnerparts = receiver.GetGenitalsList();
 | 
			
		||||
            var interaction = rjw.Modules.Interactions.Helpers.InteractionHelper.GetWithExtension(props.dictionaryKey);
 | 
			
		||||
            if (receiver.genes == null)
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            if (!(props.sexType == xxx.rjwSextype.Anal && receiver.genes.HasActiveGene(GeneDefOf.rjw_genes_fertile_anus)))
 | 
			
		||||
                return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue