mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Don't call Notify_UpdatedGenes if the gene isn't menstruation-related
This commit is contained in:
		
							parent
							
								
									32800a3499
								
							
						
					
					
						commit
						7e407a1cf9
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -195,8 +195,9 @@ namespace RJW_Menstruation
 | 
				
			||||||
    [HarmonyPatch(typeof(Pawn_GeneTracker), "Notify_GenesChanged")]
 | 
					    [HarmonyPatch(typeof(Pawn_GeneTracker), "Notify_GenesChanged")]
 | 
				
			||||||
    public class Notify_GenesChanged_Patch
 | 
					    public class Notify_GenesChanged_Patch
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        public static void Postfix(Pawn_GeneTracker __instance)
 | 
					        public static void Postfix(Pawn_GeneTracker __instance, GeneDef addedOrRemovedGene)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					            if (!addedOrRemovedGene.HasModExtension<MenstruationModExtension>()) return;
 | 
				
			||||||
            foreach (HediffComp_Menstruation comp in __instance.pawn.GetMenstruationComps())
 | 
					            foreach (HediffComp_Menstruation comp in __instance.pawn.GetMenstruationComps())
 | 
				
			||||||
                comp.Notify_UpdatedGenes();
 | 
					                comp.Notify_UpdatedGenes();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue