mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Fixed an Issue with Aphrodisiac Pheromone Social Thoughts always applying (#113)
This commit is contained in:
		
							parent
							
								
									096857d4c2
								
							
						
					
					
						commit
						9e53ecd597
					
				
					 2 changed files with 18 additions and 4 deletions
				
			
		| 
						 | 
					@ -20,7 +20,7 @@ Most of the genes so far were positive or neutral,
 | 
				
			||||||
so I got some fair requests to introduce negative genes to keep xenotypes balanced. 
 | 
					so I got some fair requests to introduce negative genes to keep xenotypes balanced. 
 | 
				
			||||||
I know that this is some overlap with the STD mod, but well ... you are free to turn things off? 
 | 
					I know that this is some overlap with the STD mod, but well ... you are free to turn things off? 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Additions** 
 | 
					**Additions:** 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Passive Gene: *Genetic Disease Immunity* - cannot get infected by any genetic diseases, and won't be affected by some other genes (see relevant genes)
 | 
					- Passive Gene: *Genetic Disease Immunity* - cannot get infected by any genetic diseases, and won't be affected by some other genes (see relevant genes)
 | 
				
			||||||
- Disease Gene: Vulnerability. Pawn is likelier to be raped 
 | 
					- Disease Gene: Vulnerability. Pawn is likelier to be raped 
 | 
				
			||||||
| 
						 | 
					@ -28,7 +28,11 @@ I know that this is some overlap with the STD mod, but well ... you are free to
 | 
				
			||||||
- Disease Gene: Infectious Homosexuality & Bisexuality
 | 
					- Disease Gene: Infectious Homosexuality & Bisexuality
 | 
				
			||||||
- Disease Gene: Fluctual Sexual Need. (Configurable) Chance to reset sex-need to near-zero and gain a bit of rest-need. 
 | 
					- Disease Gene: Fluctual Sexual Need. (Configurable) Chance to reset sex-need to near-zero and gain a bit of rest-need. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Internal**
 | 
					**Fixes:**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Fixed an Issue where pawns would always get the Pheromone social boost, unless they had the pheromone (#113)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Internal:**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- GenderFluid-Gene now uses a generalized `TickBasedChanceExtension` over its unique special `GenderFluidExtension`
 | 
					- GenderFluid-Gene now uses a generalized `TickBasedChanceExtension` over its unique special `GenderFluidExtension`
 | 
				
			||||||
- Introduced a `ModLog.Debug` Function that checks for the settings before printing - trying to spread it over the whole project. 
 | 
					- Introduced a `ModLog.Debug` Function that checks for the settings before printing - trying to spread it over the whole project. 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,10 +40,20 @@ namespace RJW_Genes
 | 
				
			||||||
            // If the pawn is not on Map (e.g. caravan), no mali 
 | 
					            // If the pawn is not on Map (e.g. caravan), no mali 
 | 
				
			||||||
            if (!MapUtility.PawnIsOnHomeMap(pawn))
 | 
					            if (!MapUtility.PawnIsOnHomeMap(pawn))
 | 
				
			||||||
                return (ThoughtState)false;
 | 
					                return (ThoughtState)false;
 | 
				
			||||||
            // Do nothing for pawns that also have pheromones
 | 
					
 | 
				
			||||||
            if (GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_aphrodisiac_pheromones))
 | 
					            // Do nothing if the pawn does not have the pheromones
 | 
				
			||||||
 | 
					            if (!GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_aphrodisiac_pheromones))
 | 
				
			||||||
                return (ThoughtState)false;
 | 
					                return (ThoughtState)false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // Do nothing for others that also have pheromones
 | 
				
			||||||
 | 
					            if (GeneUtility.HasGeneNullCheck(other, GeneDefOf.rjw_genes_aphrodisiac_pheromones))
 | 
				
			||||||
 | 
					                return (ThoughtState)false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // Do nothing for pawns that wear Gas-Masks
 | 
				
			||||||
 | 
					            if (other.apparel != null && other.apparel.AnyApparel)
 | 
				
			||||||
 | 
					                if (other.apparel.WornApparel.Any(apparel => apparel.def == RimWorld.ThingDefOf.Apparel_GasMask))
 | 
				
			||||||
 | 
					                    return (ThoughtState)false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Actual Logic: 
 | 
					            // Actual Logic: 
 | 
				
			||||||
            // Pawn qualifies in right distance and needs line of sight.
 | 
					            // Pawn qualifies in right distance and needs line of sight.
 | 
				
			||||||
            var pos = other.Position; 
 | 
					            var pos = other.Position; 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue