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
|
@ -40,10 +40,20 @@ namespace RJW_Genes
|
|||
// If the pawn is not on Map (e.g. caravan), no mali
|
||||
if (!MapUtility.PawnIsOnHomeMap(pawn))
|
||||
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;
|
||||
|
||||
// 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:
|
||||
// Pawn qualifies in right distance and needs line of sight.
|
||||
var pos = other.Position;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue