mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Add an explanation to the CompPostPostRemoved check, as well as refactor the checks a bit
This commit is contained in:
		
							parent
							
								
									947c61c8a2
								
							
						
					
					
						commit
						d0210c23bf
					
				
					 3 changed files with 4 additions and 2 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -184,7 +184,7 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        public override void CompPostPostRemoved()
 | 
			
		||||
        {
 | 
			
		||||
            if (parent.pawn.GetBreastComp() == this)
 | 
			
		||||
            if (parent.pawn.health.hediffSet.hediffs.Contains(parent))
 | 
			
		||||
            {
 | 
			
		||||
                Log.Warning($"Attempted to remove breast comp from wrong pawn ({parent.pawn}).");
 | 
			
		||||
                return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -527,7 +527,9 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        public override void CompPostPostRemoved()
 | 
			
		||||
        {
 | 
			
		||||
            if (parent.pawn.GetMenstruationComps().Contains(this))
 | 
			
		||||
            // If a hediff is removed from a pawn that does not have it, CompPostPostRemoved is still called on the pawn that does.
 | 
			
		||||
            // If it was a legitimate removal, then it won't be in this pawn's hediff list anymore, as that removal occurs first
 | 
			
		||||
            if (parent.pawn.health.hediffSet.hediffs.Contains(parent))
 | 
			
		||||
            {
 | 
			
		||||
                Log.Warning($"Attempted to remove menstruation comp from wrong pawn ({parent.pawn}).");
 | 
			
		||||
                return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue