mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Slight refactor of GetFertileMenstruationComp
This commit is contained in:
		
							parent
							
								
									931b974bf9
								
							
						
					
					
						commit
						ea7b8e03ee
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		| 
						 | 
					@ -41,9 +41,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
        public static HediffComp_Menstruation GetFertileMenstruationComp(this Pawn pawn)
 | 
					        public static HediffComp_Menstruation GetFertileMenstruationComp(this Pawn pawn)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            List<HediffComp_Menstruation> comps = pawn.GetMenstruationComps().ToList();
 | 
					            List<HediffComp_Menstruation> comps = pawn.GetMenstruationComps().ToList();
 | 
				
			||||||
            HediffComp_Menstruation comp = comps.Where(c => c.IsDangerDay).RandomElementWithFallback();
 | 
					            return comps.Where(c => c.IsDangerDay).RandomElementWithFallback() ?? comps.RandomElementWithFallback();
 | 
				
			||||||
            if (comp == null) return comps.RandomElementWithFallback();
 | 
					 | 
				
			||||||
            else return comp;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static HediffComp_Menstruation GetMenstruationComp(this Hediff hediff)
 | 
					        public static HediffComp_Menstruation GetMenstruationComp(this Hediff hediff)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue