mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Simple gene for blocking Masturbation with a PostFix
This commit is contained in:
		
							parent
							
								
									0032913a57
								
							
						
					
					
						commit
						32774ca3be
					
				
					 4 changed files with 46 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -74,8 +74,9 @@ namespace RJW_Genes
 | 
			
		|||
		public static readonly GeneDef rjw_genes_insectbreeder;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_insectincubator;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_hardwired_progenity;
 | 
			
		||||
        
 | 
			
		||||
		// Cum 
 | 
			
		||||
		public static readonly GeneDef rjw_genes_blocked_masturbation;
 | 
			
		||||
 | 
			
		||||
        // Cum 
 | 
			
		||||
        public static readonly GeneDef rjw_genes_no_cum;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_much_cum;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_very_much_cum;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										25
									
								
								Source/Genes/Breeding/Patches/Patch_BlockedMasturbation.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Source/Genes/Breeding/Patches/Patch_BlockedMasturbation.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
using HarmonyLib;
 | 
			
		||||
using rjw;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Verse; 
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    [HarmonyPatch(typeof(xxx), "can_masturbate")]
 | 
			
		||||
    public class Patch_BlockedMasturbation
 | 
			
		||||
    {
 | 
			
		||||
        public void PostFix(Pawn pawn, ref bool __result)
 | 
			
		||||
        {
 | 
			
		||||
            // Simply check if the pawn has genes, and if so, if they have the active gene for blocked masturbation
 | 
			
		||||
            if (pawn.genes != null)
 | 
			
		||||
            {
 | 
			
		||||
                __result = __result && !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_blocked_masturbation);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue