mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Do the concealed hediff removal in two stages to avoid a collection modification error
This commit is contained in:
		
							parent
							
								
									16c0362dc2
								
							
						
					
					
						commit
						c3ce69ac0a
					
				
					 2 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -30,7 +31,8 @@ namespace RJW_Menstruation
 | 
			
		|||
            base.PostAdd(dinfo);
 | 
			
		||||
            if (IsVisible)
 | 
			
		||||
            {
 | 
			
		||||
                foreach (Hediff concealedEstrus in pawn.health.hediffSet.hediffs.Where(hediff => hediff.def == VariousDefOf.Hediff_Estrus_Concealed))
 | 
			
		||||
                List<Hediff> removals = pawn.health.hediffSet.hediffs.Where(hediff => hediff.def == VariousDefOf.Hediff_Estrus_Concealed).ToList();
 | 
			
		||||
                foreach (Hediff concealedEstrus in removals)
 | 
			
		||||
                {
 | 
			
		||||
                    pawn.health.RemoveHediff(concealedEstrus);
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
Version 1.0.7.5
 | 
			
		||||
 - Fix error when one womb's concealed estrus is overwritten by another womb's visible estrus.
 | 
			
		||||
 - Climacteric and menopause are now per-womb. Their effect on overall sex drive and satisfaction will depend on the health of any other wombs.
 | 
			
		||||
 | 
			
		||||
Version 1.0.7.4
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue