mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Merge b6e1d1ddb7 into a685209dc1
				
					
				
			This commit is contained in:
		
						commit
						66bd24cd08
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
					@ -9,18 +9,18 @@ using Verse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace RJW_Genes
 | 
					namespace RJW_Genes
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    [HarmonyPatch(typeof(xxx), "can_masturbate")]
 | 
					    [HarmonyPatch(typeof(ThinkNode_ChancePerHour_Fappin), "MtbHours")]
 | 
				
			||||||
    public class Patch_BlockedMasturbation
 | 
					    public static class Patch_BlockedMasturbation
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        public void PostFix(Pawn pawn, ref bool __result)
 | 
					        public static void Postfix(Pawn p, ref float __result)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (pawn != null && !pawn.IsAnimal() && pawn.genes != null)
 | 
					            if (p != null && !p.IsAnimal() && p.genes != null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                __result = __result 
 | 
					                if (p.genes.HasActiveGene(GeneDefOf.rjw_genes_blocked_masturbation) || p.genes.HasActiveGene(GeneDefOf.rjw_genes_infectious_blocked_masturbation))
 | 
				
			||||||
                    && !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_blocked_masturbation)
 | 
					                {
 | 
				
			||||||
                    && !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_infectious_blocked_masturbation);
 | 
					                    __result = -2f;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue