mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	For multiple vaginas, concealed estrus won't occur if in visible estrus, and visible estrus will cancel concealed estrus
This commit is contained in:
		
							parent
							
								
									1907820265
								
							
						
					
					
						commit
						2b8d822542
					
				
					 4 changed files with 14 additions and 2 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -1023,14 +1023,26 @@ namespace RJW_Menstruation
 | 
				
			||||||
        public void SetEstrus(int days)
 | 
					        public void SetEstrus(int days)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            HediffDef estrusdef = Props.concealedEstrus ? VariousDefOf.Hediff_Estrus_Concealed : VariousDefOf.Hediff_Estrus;
 | 
					            HediffDef estrusdef = Props.concealedEstrus ? VariousDefOf.Hediff_Estrus_Concealed : VariousDefOf.Hediff_Estrus;
 | 
				
			||||||
            HediffWithComps hediff = (HediffWithComps)parent.pawn.health.hediffSet.GetFirstHediffOfDef(estrusdef);
 | 
					            Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(estrusdef);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (Props.concealedEstrus)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Estrus)) return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                HediffDef concealedEstrusDef = VariousDefOf.Hediff_Estrus_Concealed;
 | 
				
			||||||
 | 
					                Hediff concealedHediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(concealedEstrusDef);
 | 
				
			||||||
 | 
					                if (parent.pawn.health.hediffSet.HasHediff(concealedEstrusDef)) parent.pawn.health.RemoveHediff(concealedHediff);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (hediff != null)
 | 
					            if (hediff != null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                hediff.Severity = (float)days / Configurations.CycleAcceleration + 0.2f;
 | 
					                hediff.Severity = (float)days / Configurations.CycleAcceleration + 0.2f;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                hediff = (HediffWithComps)HediffMaker.MakeHediff(estrusdef, parent.pawn);
 | 
					                hediff = HediffMaker.MakeHediff(estrusdef, parent.pawn);
 | 
				
			||||||
                hediff.Severity = (float)days / Configurations.CycleAcceleration + 0.2f;
 | 
					                hediff.Severity = (float)days / Configurations.CycleAcceleration + 0.2f;
 | 
				
			||||||
                parent.pawn.health.AddHediff(hediff);
 | 
					                parent.pawn.health.AddHediff(hediff);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue