mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Little refactor in CalculateLastBirth
This commit is contained in:
		
							parent
							
								
									4b6b4c87ee
								
							
						
					
					
						commit
						6701785462
					
				
					 1 changed files with 5 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -3,6 +3,7 @@ using RimWorld;
 | 
			
		|||
using rjw;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -187,13 +188,10 @@ namespace RJW_Menstruation
 | 
			
		|||
                foreach (Pawn child in parent.pawn.relations.Children)
 | 
			
		||||
                {
 | 
			
		||||
                    bool isFetus = false;
 | 
			
		||||
                    foreach (Hediff_BasePregnancy preg in parent.pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>())
 | 
			
		||||
                    if (parent.pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().Any(preg => preg.babies.Contains(child)))
 | 
			
		||||
                    {
 | 
			
		||||
                        if (preg.babies.Contains(child))
 | 
			
		||||
                        {
 | 
			
		||||
                            isFetus = true;
 | 
			
		||||
                            break;
 | 
			
		||||
                        }
 | 
			
		||||
                        isFetus = true;
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
                    
 | 
			
		||||
                    if (
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue