mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Update Patch_BlockedMasturbation.cs
Current Blocked Masturbation gene patch does not function, new patch works using the same implementation as RJW Sexperience Ideology
This commit is contained in:
		
							parent
							
								
									a685209dc1
								
							
						
					
					
						commit
						b6e1d1ddb7
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -9,18 +9,18 @@ using Verse;
 | 
			
		|||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    [HarmonyPatch(typeof(xxx), "can_masturbate")]
 | 
			
		||||
    public class Patch_BlockedMasturbation
 | 
			
		||||
    [HarmonyPatch(typeof(ThinkNode_ChancePerHour_Fappin), "MtbHours")]
 | 
			
		||||
    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 
 | 
			
		||||
                    && !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_blocked_masturbation)
 | 
			
		||||
                    && !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_infectious_blocked_masturbation);
 | 
			
		||||
                if (p.genes.HasActiveGene(GeneDefOf.rjw_genes_blocked_masturbation) || p.genes.HasActiveGene(GeneDefOf.rjw_genes_infectious_blocked_masturbation))
 | 
			
		||||
                {
 | 
			
		||||
                    __result = -2f;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue