mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Trying to remove Sex-Change Thoughts for Babies, fixes #103
This commit is contained in:
		
							parent
							
								
									e13c00ce01
								
							
						
					
					
						commit
						70ffef13c8
					
				
					 4 changed files with 22 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -31,7 +31,7 @@
 | 
			
		|||
- Pawns with "rjw_genes_no_sexneed" wont go raping (or atleast way less, #100)
 | 
			
		||||
- Extra Nullcheck for Genes in Orgasmic Mytosis (#95)
 | 
			
		||||
- Orgasmic Mytosis Pawns *should* inherit the Xenotypename and favorite colour now 
 | 
			
		||||
 | 
			
		||||
- Babies should not have "SexChangeThoughts" anymore when they had a (fe)male-only gene (#103)
 | 
			
		||||
 | 
			
		||||
**Changes**:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -101,5 +101,20 @@ namespace RJW_Genes
 | 
			
		|||
                    pawn.health.RemoveHediff(hediff);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// This check helps to get babies after birth, if the pawn was born with the gene it does not need to have thoughts.
 | 
			
		||||
        /// There are very different ways to do the life stages, and there are also HAR people still around, 
 | 
			
		||||
        /// so instead of checking for stages I intentionally check for the biological ticks to be very low (that they can only exist basically if they are born right before).
 | 
			
		||||
        /// Issue is tracked in #103.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="pawn"></param>
 | 
			
		||||
        public static void RemoveSexChangeThoughtsIfTooYoung(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn.ageTracker.AgeBiologicalTicks < 1000)
 | 
			
		||||
            {
 | 
			
		||||
                GenderUtility.RemoveAllSexChangeThoughts(pawn);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,12 +14,15 @@ namespace RJW_Genes
 | 
			
		|||
            // Here we call Sexualization after the Sex-Change
 | 
			
		||||
            if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
 | 
			
		||||
                Sexualizer.sexualize_pawn(pawn);
 | 
			
		||||
 | 
			
		||||
            GenderUtility.RemoveSexChangeThoughtsIfTooYoung(this.pawn);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
            AdjustPawnToFemale();
 | 
			
		||||
            GenderUtility.RemoveSexChangeThoughtsIfTooYoung(this.pawn);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void AdjustPawnToFemale()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,12 +14,15 @@ namespace RJW_Genes
 | 
			
		|||
            // Here we call Sexualization after the Sex-Change
 | 
			
		||||
            if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
 | 
			
		||||
                Sexualizer.sexualize_pawn(pawn);
 | 
			
		||||
 | 
			
		||||
            GenderUtility.RemoveSexChangeThoughtsIfTooYoung(this.pawn);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
            AdjustPawnToMale();
 | 
			
		||||
            GenderUtility.RemoveSexChangeThoughtsIfTooYoung(this.pawn);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void AdjustPawnToMale()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue