mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Simplify CalculatedImplantChance a little
This commit is contained in:
		
							parent
							
								
									3498caf3a2
								
							
						
					
					
						commit
						0dd3507010
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		| 
						 | 
					@ -328,18 +328,17 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        protected float CalculatedImplantChance()
 | 
					        protected float CalculatedImplantChance()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            float factor = 1.0f;
 | 
					 | 
				
			||||||
            if (ModsConfig.BiotechActive && xxx.is_human(Pawn))
 | 
					            if (ModsConfig.BiotechActive && xxx.is_human(Pawn))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                // Implant factor will be based solely on pawn age, plus any rollover from ovulation chance
 | 
					                // Implant factor will be based solely on pawn age, plus any rollover from ovulation chance
 | 
				
			||||||
                StatPart_FertilityByGenderAge fertilityStatPart = StatDefOf.Fertility.GetStatPart<StatPart_FertilityByGenderAge>();
 | 
					                float factor = 1.0f;
 | 
				
			||||||
                fertilityStatPart?.TransformValue(StatRequest.For(Pawn), ref factor);
 | 
					                StatDefOf.Fertility.GetStatPart<StatPart_FertilityByGenderAge>()?.TransformValue(StatRequest.For(Pawn), ref factor);
 | 
				
			||||||
                if (OvulationChance > 1.0f) factor *= OvulationChance;
 | 
					                if (OvulationChance > 1.0f) factor *= OvulationChance;
 | 
				
			||||||
                return Props.baseImplantationChanceFactor * FertilityModifier * factor;
 | 
					                return Props.baseImplantationChanceFactor * FertilityModifier * factor;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier * factor;
 | 
					                return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue