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
				
			
		| 
						 | 
					@ -111,7 +111,7 @@ Because this is the genes mod, and I find things here quite robust.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Additions:** 
 | 
					**Additions:** 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Passive Gene: Genetic Disease Immunity. cannot get infected by any genetic diseases, and won't be affected by some other genes (see relevant genes)
 | 
					- Gene: Genetic Disease Immunity. cannot get infected by any genetic diseases, and won't be affected by some other genes (see relevant genes)
 | 
				
			||||||
- Disease Gene: Vulnerability. Pawn is likelier to be raped 
 | 
					- Disease Gene: Vulnerability. Pawn is likelier to be raped 
 | 
				
			||||||
- Disease Gene: Infectious Hypersexuality
 | 
					- Disease Gene: Infectious Hypersexuality
 | 
				
			||||||
- Disease Gene: Infectious Homosexuality & Bisexuality
 | 
					- Disease Gene: Infectious Homosexuality & Bisexuality
 | 
				
			||||||
| 
						 | 
					@ -126,6 +126,7 @@ Because this is the genes mod, and I find things here quite robust.
 | 
				
			||||||
- Gene: Sperm Displacement. Pawns might overwrite an existing pregnancy, becoming the new father. The pregnancy will stay in its gestation progress.
 | 
					- Gene: Sperm Displacement. Pawns might overwrite an existing pregnancy, becoming the new father. The pregnancy will stay in its gestation progress.
 | 
				
			||||||
- Gene: Twinkification: Pawns turn their (male) sexual partners into breedable twinks.
 | 
					- Gene: Twinkification: Pawns turn their (male) sexual partners into breedable twinks.
 | 
				
			||||||
- Gene: Feminization: Pawns turn their (male) sexual partners into women.
 | 
					- Gene: Feminization: Pawns turn their (male) sexual partners into women.
 | 
				
			||||||
 | 
					- Gene: Blocked Masturbation: Pawns cannot masturbate. 
 | 
				
			||||||
- Pawns will have negative thoughts about pawns with more genetic diseases than themselves. 
 | 
					- Pawns will have negative thoughts about pawns with more genetic diseases than themselves. 
 | 
				
			||||||
- Faction Penalties for spreading diseases, stealing genes and aging pawns with age transfer
 | 
					- Faction Penalties for spreading diseases, stealing genes and aging pawns with age transfer
 | 
				
			||||||
- Patch  for [Imphilee Xeno](https://steamcommunity.com/sharedfiles/filedetails/?id=2990674516) by @Bunuffin
 | 
					- Patch  for [Imphilee Xeno](https://steamcommunity.com/sharedfiles/filedetails/?id=2990674516) by @Bunuffin
 | 
				
			||||||
| 
						 | 
					@ -161,6 +162,11 @@ Verse.Log:Error (string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This is not dangerous.
 | 
					This is not dangerous.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*Blocked Masturbation* 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Might not be fully working - for testing, I run things in DevMode, and I can just order people to masturbate. 
 | 
				
			||||||
 | 
					Please playtest this a bit for me, as I want to make it work nicely. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*Supporting*
 | 
					*Supporting*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
You can now support me with [buying me a coffee](https://buymeacoffee.com/vegapnk). 
 | 
					You can now support me with [buying me a coffee](https://buymeacoffee.com/vegapnk). 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -153,4 +153,14 @@
 | 
				
			||||||
    <biostatMet>0</biostatMet>
 | 
					    <biostatMet>0</biostatMet>
 | 
				
			||||||
  </GeneDef>
 | 
					  </GeneDef>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <GeneDef ParentName="BreedingBase">
 | 
				
			||||||
 | 
					    <defName>rjw_genes_blocked_masturbation</defName>
 | 
				
			||||||
 | 
					    <label>no masturbation</label>
 | 
				
			||||||
 | 
					    <description>Carriers of this gene are unable to masturbate - they need a partner or equipment.</description>
 | 
				
			||||||
 | 
					    <iconPath>Genes/Icons/Hypersexual</iconPath>
 | 
				
			||||||
 | 
					    <displayOrderInCategory>60</displayOrderInCategory>
 | 
				
			||||||
 | 
					    <biostatCpx>1</biostatCpx>
 | 
				
			||||||
 | 
					    <biostatMet>1</biostatMet>
 | 
				
			||||||
 | 
					  </GeneDef>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</Defs>
 | 
					</Defs>
 | 
				
			||||||
| 
						 | 
					@ -74,6 +74,7 @@ namespace RJW_Genes
 | 
				
			||||||
		public static readonly GeneDef rjw_genes_insectbreeder;
 | 
							public static readonly GeneDef rjw_genes_insectbreeder;
 | 
				
			||||||
		public static readonly GeneDef rjw_genes_insectincubator;
 | 
							public static readonly GeneDef rjw_genes_insectincubator;
 | 
				
			||||||
		public static readonly GeneDef rjw_genes_hardwired_progenity;
 | 
							public static readonly GeneDef rjw_genes_hardwired_progenity;
 | 
				
			||||||
 | 
							public static readonly GeneDef rjw_genes_blocked_masturbation;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Cum 
 | 
					        // Cum 
 | 
				
			||||||
        public static readonly GeneDef rjw_genes_no_cum;
 | 
					        public static readonly GeneDef rjw_genes_no_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