Gas-Mask Check for Aphrodisiac Genes, Closes #108

This commit is contained in:
Vegapnk 2024-06-27 14:46:23 +02:00
parent c37537c817
commit ad14ead1b3
2 changed files with 5 additions and 0 deletions

View file

@ -14,6 +14,7 @@
- "Curiosity Genes" alongside other Curiosities from VRE. Thanks to @Jaaldabaoth (#88)
- Support for many VE-Genetics Animals into the Animal-Framework. Thanks to @Jaaldabaoth (#88)
- "Likes Cumflation"-Gene now also makes pawns immune against the effects of cumflations. They are still cumflated.
- Gasmasks make immune against Aphrodisiac Pheromones (#108)
**Fixes**:

View file

@ -57,6 +57,10 @@ namespace RJW_Genes
// Do nothing for pawns that also have pheromones
if (GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_aphrodisiac_pheromones))
continue;
// Do nothing for pawns that wear Gas-Masks
if (pawn.apparel != null && pawn.apparel.AnyApparel)
if (pawn.apparel.WornApparel.Any(apparel => apparel.def == RimWorld.ThingDefOf.Apparel_GasMask))
continue;
// Actual Logic:
// Pawn qualifies in right distance and needs line of sight.