mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Let the pregnancy detector in the initialization pick up multiple pregnancies, just in case
This commit is contained in:
		
							parent
							
								
									3f3977b3c7
								
							
						
					
					
						commit
						52b0c3ab95
					
				
					 1 changed files with 12 additions and 6 deletions
				
			
		| 
						 | 
					@ -885,13 +885,19 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            InitOvary();
 | 
					            InitOvary();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (pregnancy == null &&    // If there's no pregnancy registered in this womb...
 | 
					            if (pregnancy == null)
 | 
				
			||||||
                PregnancyHelper.GetPregnancy(parent.pawn) is Hediff_BasePregnancy preg &&   // ...but the pawn is pregnant...
 | 
					 | 
				
			||||||
                preg.GetMenstruationComp() == null)   // ...and another womb doesn't have it, then pick it up
 | 
					 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                currentIntervalHours = (int)preg.GestationHours();
 | 
					                // If this womb isn't marked pregnant, search for pregnancies that have no womb and claim one
 | 
				
			||||||
                curStage = Stage.Pregnant;
 | 
					                foreach (Hediff_BasePregnancy preg in parent.pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>())
 | 
				
			||||||
                pregnancy = preg;
 | 
					                {
 | 
				
			||||||
 | 
					                    if (preg.GetMenstruationComp() == null)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        currentIntervalHours = (int)preg.GestationHours();
 | 
				
			||||||
 | 
					                        curStage = Stage.Pregnant;
 | 
				
			||||||
 | 
					                        pregnancy = preg;
 | 
				
			||||||
 | 
					                        break;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (parent.pawn.IsAnimal())
 | 
					            if (parent.pawn.IsAnimal())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue