mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Merge branch 'dev' into main
This commit is contained in:
		
						commit
						f3cc5e7ee2
					
				
					 39 changed files with 763 additions and 232 deletions
				
			
		
							
								
								
									
										20
									
								
								CHANGELOG.md
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								CHANGELOG.md
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,3 +1,23 @@
 | 
			
		|||
# 1.1.0 (2023-xx-xx)
 | 
			
		||||
 | 
			
		||||
Features: 
 | 
			
		||||
 | 
			
		||||
- Succubus (see below)
 | 
			
		||||
- Orgasm Rush got a Hediff
 | 
			
		||||
- Unbreakable Gene
 | 
			
		||||
- Age-Transfer and Youth-Fountain per Sex Gene 
 | 
			
		||||
- Bisexual and Homosexual Genes with Placeholder Icon
 | 
			
		||||
- Balancing some Genes by changing metabolism and complexity
 | 
			
		||||
 | 
			
		||||
Succubus:
 | 
			
		||||
 | 
			
		||||
Fixes:
 | 
			
		||||
 | 
			
		||||
- Issue with Breast-Size (#8) fixed by lowercasing breast-match (Shabakur) 
 | 
			
		||||
- Error on Game Load when Licentia Genes are tried to be added to Xenotypes for players without Licentia (#5)
 | 
			
		||||
- Futa Gene only triggers if Pawn is not a futa already (#2)
 | 
			
		||||
- Genitalia Resizing triggers on 20th Birthday (#11)
 | 
			
		||||
 | 
			
		||||
# 1.0.1 (2022-12-20)
 | 
			
		||||
 | 
			
		||||
- Fix issue with Orgasm Rush throwing an Error on Animal Orgasm (Thanks Shabakur)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,7 +57,7 @@
 | 
			
		|||
 | 
			
		||||
  <GeneCategoryDef>
 | 
			
		||||
    <defName>rjw_genes_special</defName>
 | 
			
		||||
    <label>Genital Related Damage</label>
 | 
			
		||||
    <label>Genital Based Special Abilities</label>
 | 
			
		||||
    <displayPriorityInXenotype>8</displayPriorityInXenotype>
 | 
			
		||||
  </GeneCategoryDef>
 | 
			
		||||
  
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,6 +9,8 @@
 | 
			
		|||
    <iconPath>World/WorldObjects/Expanding/Mechanoids</iconPath>
 | 
			
		||||
    <displayOrderInCategory>51</displayOrderInCategory>
 | 
			
		||||
	  <displayCategory>rjw_genes_breeding</displayCategory>
 | 
			
		||||
    <biostatCpx>1</biostatCpx>
 | 
			
		||||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
  
 | 
			
		||||
  <GeneDef>
 | 
			
		||||
| 
						 | 
				
			
			@ -18,6 +20,8 @@
 | 
			
		|||
    <iconPath>Genes/Icons/More_Egg_Space</iconPath>
 | 
			
		||||
    <displayOrderInCategory>52</displayOrderInCategory>
 | 
			
		||||
    <displayCategory>rjw_genes_breeding</displayCategory>
 | 
			
		||||
    <biostatCpx>1</biostatCpx>
 | 
			
		||||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
 | 
			
		||||
  <GeneDef>
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +31,8 @@
 | 
			
		|||
    <iconPath>World/WorldObjects/Expanding/Insects</iconPath>
 | 
			
		||||
    <displayOrderInCategory>53</displayOrderInCategory>
 | 
			
		||||
	  <displayCategory>rjw_genes_breeding</displayCategory>
 | 
			
		||||
    <biostatCpx>1</biostatCpx>
 | 
			
		||||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
  
 | 
			
		||||
    <GeneDef>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,25 @@
 | 
			
		|||
    <description>This Xenotype cannot get stretched by huge penetrators.</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Elasticity</iconPath>
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_Elasticity</geneClass>
 | 
			
		||||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
    <biostatCpx>1</biostatCpx>
 | 
			
		||||
    <displayOrderInCategory>1</displayOrderInCategory>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
 | 
			
		||||
  <GeneDef >
 | 
			
		||||
    <defName>rjw_genes_unbreakable</defName>
 | 
			
		||||
    <label>Unbreakable</label>
 | 
			
		||||
    <displayCategory>rjw_genes_damage</displayCategory>
 | 
			
		||||
    <description>This Gene makes the Carrier unable to get mood or social penalties from being raped and they cannot be broken for a long period of time.</description>
 | 
			
		||||
    <iconPath>UI/Icons/Rituals/TrialDefend</iconPath>
 | 
			
		||||
    <displayOrderInCategory>2</displayOrderInCategory>
 | 
			
		||||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
    <biostatCpx>1</biostatCpx>
 | 
			
		||||
    <!-- Note: This Gene is mostly handled by patching XMLs -->
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_Unbreakable</geneClass>
 | 
			
		||||
    <hediffGiversCannotGive>
 | 
			
		||||
      <li>FeelingBroken</li>
 | 
			
		||||
    </hediffGiversCannotGive>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
 | 
			
		||||
</Defs>
 | 
			
		||||
| 
						 | 
				
			
			@ -9,7 +9,7 @@
 | 
			
		|||
  <GeneDef ParentName="GeneGenitaliaSizeBase">
 | 
			
		||||
    <defName>rjw_genes_big_male_genitalia</defName>
 | 
			
		||||
    <label>Big Male Genitaliasize</label>
 | 
			
		||||
    <description>Penises of this Xenotype are bigger.</description>
 | 
			
		||||
    <description>Penises of this Xenotype are bigger.(Resizing takes place at 20th Birthday)</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Small_Male_Genitalia</iconPath>
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_BigMaleGenitalia</geneClass>
 | 
			
		||||
    <displayOrderInCategory>751</displayOrderInCategory>
 | 
			
		||||
| 
						 | 
				
			
			@ -21,7 +21,7 @@
 | 
			
		|||
  <GeneDef ParentName="GeneGenitaliaSizeBase">
 | 
			
		||||
    <defName>rjw_genes_small_male_genitalia</defName>
 | 
			
		||||
    <label>Small Male Genitaliasize</label>
 | 
			
		||||
    <description>Penises of this Xenotype are smaller.</description>
 | 
			
		||||
    <description>Penises of this Xenotype are smaller. (Resizing takes place at 20th Birthday)</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Big_Male_Genitalia</iconPath>
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_SmallMaleGenitalia</geneClass>
 | 
			
		||||
    <displayOrderInCategory>753</displayOrderInCategory>
 | 
			
		||||
| 
						 | 
				
			
			@ -34,7 +34,7 @@
 | 
			
		|||
  <GeneDef ParentName="GeneGenitaliaSizeBase">
 | 
			
		||||
    <defName>rjw_genes_loose_female_genitalia</defName>
 | 
			
		||||
    <label>Loose Female Genitalia</label>
 | 
			
		||||
    <description>Vaginas of this Xenotype are quite spacy.</description>
 | 
			
		||||
    <description>Vaginas of this Xenotype are quite spacy. (Resizing takes place at 20th Birthday)</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Loose_Female_Genitalia</iconPath>
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_LooseFemaleGenitalia</geneClass>
 | 
			
		||||
    <displayOrderInCategory>754</displayOrderInCategory>
 | 
			
		||||
| 
						 | 
				
			
			@ -46,7 +46,7 @@
 | 
			
		|||
  <GeneDef ParentName="GeneGenitaliaSizeBase">
 | 
			
		||||
    <defName>rjw_genes_tight_female_genitalia</defName>
 | 
			
		||||
    <label>Tight Female Genitalia</label>
 | 
			
		||||
    <description>Vaginas of this Xenotype are pretty tight.</description>
 | 
			
		||||
    <description>Vaginas of this Xenotype are pretty tight.(Resizing takes place at 20th Birthday)</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Tight_Female_Genitalia</iconPath>
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_TightFemaleGenitalia</geneClass>
 | 
			
		||||
    <displayOrderInCategory>756</displayOrderInCategory>
 | 
			
		||||
| 
						 | 
				
			
			@ -59,7 +59,7 @@
 | 
			
		|||
  <GeneDef ParentName="GeneGenitaliaSizeBase">
 | 
			
		||||
    <defName>rjw_genes_big_breasts</defName>
 | 
			
		||||
    <label>Big Breasts</label>
 | 
			
		||||
    <description>Females of this Xenotype have big honkers.</description>
 | 
			
		||||
    <description>Females of this Xenotype have big honkers.(Resizing takes place at 20th Birthday)</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Big_Breasts</iconPath>
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_BigBreasts</geneClass>
 | 
			
		||||
    <displayOrderInCategory>757</displayOrderInCategory>
 | 
			
		||||
| 
						 | 
				
			
			@ -71,7 +71,7 @@
 | 
			
		|||
  <GeneDef ParentName="GeneGenitaliaSizeBase">
 | 
			
		||||
    <defName>rjw_genes_small_breasts</defName>
 | 
			
		||||
    <label>Small Breasts</label>
 | 
			
		||||
    <description>Females of this Xenotype have smaller breasts.</description>
 | 
			
		||||
    <description>Females of this Xenotype have smaller breasts.(Resizing takes place at 20th Birthday)</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Small_Breasts</iconPath>
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_SmallBreasts</geneClass>
 | 
			
		||||
    <displayOrderInCategory>759</displayOrderInCategory>
 | 
			
		||||
| 
						 | 
				
			
			@ -84,7 +84,7 @@
 | 
			
		|||
  <GeneDef ParentName="GeneGenitaliaSizeBase">
 | 
			
		||||
    <defName>rjw_genes_loose_anus</defName>
 | 
			
		||||
    <label>Loose Anus</label>
 | 
			
		||||
    <description>The Anus of this Xenotype is roomy.</description>
 | 
			
		||||
    <description>The Anus of this Xenotype is roomy.(Resizing takes place at 20th Birthday)</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Loose_Anus</iconPath>
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_LooseAnus</geneClass>
 | 
			
		||||
    <displayOrderInCategory>760</displayOrderInCategory>
 | 
			
		||||
| 
						 | 
				
			
			@ -96,7 +96,7 @@
 | 
			
		|||
  <GeneDef ParentName="GeneGenitaliaSizeBase">
 | 
			
		||||
    <defName>rjw_genes_tight_anus</defName>
 | 
			
		||||
    <label>Tight Anus</label>
 | 
			
		||||
    <description>The anus of this Xenotype is small.</description>
 | 
			
		||||
    <description>The anus of this Xenotype is small.(Resizing takes place at 20th Birthday)</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Tight_Anus</iconPath>
 | 
			
		||||
    <geneClass>RJW_Genes.Gene_TightAnus</geneClass>
 | 
			
		||||
    <displayOrderInCategory>762</displayOrderInCategory>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,6 +21,7 @@
 | 
			
		|||
        <displayCategory>Reproduction</displayCategory>
 | 
			
		||||
        <description>Xenotypes with this Gene are Rapists.</description>
 | 
			
		||||
        <iconPath>Genes/Icons/Rape</iconPath>
 | 
			
		||||
        <biostatMet>1</biostatMet>
 | 
			
		||||
        <displayOrderInCategory>2</displayOrderInCategory>    
 | 
			
		||||
        <forcedTraits>
 | 
			
		||||
            <li>
 | 
			
		||||
| 
						 | 
				
			
			@ -28,4 +29,41 @@
 | 
			
		|||
            </li>
 | 
			
		||||
        </forcedTraits>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
 | 
			
		||||
    <GeneDef>
 | 
			
		||||
        <defName>rjw_genes_homosexual</defName>
 | 
			
		||||
        <label>Homosexual</label>
 | 
			
		||||
        <displayCategory>Reproduction</displayCategory>
 | 
			
		||||
        <description>This Gene makes you gay.</description>
 | 
			
		||||
        <iconPath>UI\Ideoligions\Universal\RoundC</iconPath>
 | 
			
		||||
        <biostatMet>0</biostatMet>
 | 
			
		||||
        <displayOrderInCategory>3</displayOrderInCategory>    
 | 
			
		||||
        <forcedTraits>
 | 
			
		||||
            <li>
 | 
			
		||||
                <def>Gay</def>
 | 
			
		||||
            </li>
 | 
			
		||||
        </forcedTraits>
 | 
			
		||||
        <exclusionTags>
 | 
			
		||||
            <li>rjw_genes_sexual_orientation</li>
 | 
			
		||||
        </exclusionTags>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
 | 
			
		||||
    <GeneDef>
 | 
			
		||||
        <defName>rjw_genes_bisexual</defName>
 | 
			
		||||
        <label>Bisexual</label>
 | 
			
		||||
        <displayCategory>Reproduction</displayCategory>
 | 
			
		||||
        <description>Carriers of this Gene are Bisexual.</description>
 | 
			
		||||
        <iconPath>UI\Ideoligions\Universal\RoundC</iconPath>
 | 
			
		||||
        <biostatMet>0</biostatMet>
 | 
			
		||||
        <displayOrderInCategory>4</displayOrderInCategory>    
 | 
			
		||||
        <forcedTraits>
 | 
			
		||||
            <li>
 | 
			
		||||
                <def>Bisexual</def>
 | 
			
		||||
            </li>
 | 
			
		||||
        </forcedTraits>
 | 
			
		||||
        <exclusionTags>
 | 
			
		||||
            <li>rjw_genes_sexual_orientation</li>
 | 
			
		||||
        </exclusionTags>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
 | 
			
		||||
</Defs>
 | 
			
		||||
| 
						 | 
				
			
			@ -6,10 +6,34 @@
 | 
			
		|||
        <displayCategory>rjw_genes_special</displayCategory>
 | 
			
		||||
        <description>On Orgasm, carriers of this gene get a boost in activity. (rest-need is partially filled)</description>
 | 
			
		||||
        <biostatCpx>1</biostatCpx>
 | 
			
		||||
        <biostatMet>-2</biostatMet>
 | 
			
		||||
        <iconPath>UI/Memes/FleshPurity</iconPath>
 | 
			
		||||
        <displayOrderInCategory>1</displayOrderInCategory>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
	
 | 
			
		||||
    
 | 
			
		||||
    <GeneDef>
 | 
			
		||||
        <defName>rjw_genes_youth_fountain</defName>
 | 
			
		||||
        <label>Youth Fountain</label>
 | 
			
		||||
        <displayCategory>rjw_genes_special</displayCategory>
 | 
			
		||||
        <description>Having sex with a carrier of this gene makes the partner slightly younger. (Partner stays adult)</description>
 | 
			
		||||
        <biostatCpx>2</biostatCpx>
 | 
			
		||||
        <biostatMet>-2</biostatMet>
 | 
			
		||||
        <iconPath>UI/Ideoligions/FireLeaves</iconPath>
 | 
			
		||||
        <displayOrderInCategory>2</displayOrderInCategory>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
    
 | 
			
		||||
    <GeneDef>
 | 
			
		||||
        <defName>rjw_genes_sex_age_drain</defName>
 | 
			
		||||
        <label>Sexual Age Drain</label>
 | 
			
		||||
        <displayCategory>rjw_genes_special</displayCategory>
 | 
			
		||||
        <description>Having sex transfers some of the partners life-time to themselves. (Pawn stays adult)</description>
 | 
			
		||||
        <biostatCpx>2</biostatCpx>
 | 
			
		||||
        <biostatMet>-1</biostatMet>
 | 
			
		||||
        <iconPath>UI/Icons/ColonistBar/Idle</iconPath>
 | 
			
		||||
        <displayOrderInCategory>3</displayOrderInCategory>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
    
 | 
			
		||||
    <GeneDef>
 | 
			
		||||
        <defName>rjw_genes_aphrodisiac_pheromones</defName>
 | 
			
		||||
        <label>Aphrodisiac Pheromones</label>
 | 
			
		||||
| 
						 | 
				
			
			@ -17,8 +41,9 @@
 | 
			
		|||
		    <geneClass>RJW_Genes.Gene_Aphrodisiac_Pheromones</geneClass>
 | 
			
		||||
        <description>Pheremones of this pawn induce an incressed sexdrive to others nearby.</description>
 | 
			
		||||
        <iconPath>UI/Memes/FleshPurity</iconPath>
 | 
			
		||||
        <displayOrderInCategory>2</displayOrderInCategory>
 | 
			
		||||
        <displayOrderInCategory>4</displayOrderInCategory>
 | 
			
		||||
        <biostatCpx>1</biostatCpx>
 | 
			
		||||
        <biostatMet>1</biostatMet>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
    
 | 
			
		||||
</Defs>
 | 
			
		||||
							
								
								
									
										78
									
								
								Common/Defs/HediffDefs/Hediffs_OrgasmRush.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								Common/Defs/HediffDefs/Hediffs_OrgasmRush.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,78 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Defs>
 | 
			
		||||
 | 
			
		||||
  <HediffDef>
 | 
			
		||||
    <defName>rjw_genes_orgasm_rush_hediff</defName>
 | 
			
		||||
    <hediffClass>HediffWithComps</hediffClass>
 | 
			
		||||
    <label>Orgasm Rush</label>
 | 
			
		||||
    <description>Xenotypes with this Gene are pushed beyond normal limits when they have an orgasm.</description>
 | 
			
		||||
    <defaultLabelColor>(240,200,110)</defaultLabelColor>
 | 
			
		||||
    <scenarioCanAdd>false</scenarioCanAdd>
 | 
			
		||||
    <maxSeverity>1.0</maxSeverity>
 | 
			
		||||
    <isBad>false</isBad>
 | 
			
		||||
    <tendable>false</tendable>
 | 
			
		||||
    <comps>
 | 
			
		||||
      <li Class="HediffCompProperties_SeverityPerDay">
 | 
			
		||||
        <severityPerDay>-0.75</severityPerDay>
 | 
			
		||||
      </li>
 | 
			
		||||
    </comps>
 | 
			
		||||
    <stages>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>pumped</label>
 | 
			
		||||
        <statOffsets>
 | 
			
		||||
          <MeleeDodgeChance>4</MeleeDodgeChance>
 | 
			
		||||
          <ShootingAccuracyPawn>4</ShootingAccuracyPawn>
 | 
			
		||||
        </statOffsets>
 | 
			
		||||
        <capMods>
 | 
			
		||||
          <li>
 | 
			
		||||
            <capacity>Consciousness</capacity>
 | 
			
		||||
            <offset>0.05</offset>
 | 
			
		||||
          </li>
 | 
			
		||||
        </capMods>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>charged</label>
 | 
			
		||||
        <minSeverity>0.4</minSeverity>
 | 
			
		||||
        <statOffsets>
 | 
			
		||||
          <MeleeDodgeChance>8</MeleeDodgeChance>
 | 
			
		||||
          <ShootingAccuracyPawn>8</ShootingAccuracyPawn>
 | 
			
		||||
        </statOffsets>
 | 
			
		||||
        <capMods>
 | 
			
		||||
          <li>
 | 
			
		||||
            <capacity>Moving</capacity>
 | 
			
		||||
            <offset>0.08</offset>
 | 
			
		||||
          </li>
 | 
			
		||||
          <li>
 | 
			
		||||
            <capacity>Consciousness</capacity>
 | 
			
		||||
            <offset>0.08</offset>
 | 
			
		||||
          </li>
 | 
			
		||||
        </capMods>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>super-charged</label>
 | 
			
		||||
        <minSeverity>0.7</minSeverity>
 | 
			
		||||
        <statOffsets>
 | 
			
		||||
          <MeleeDodgeChance>10</MeleeDodgeChance>
 | 
			
		||||
          <ShootingAccuracyPawn>10</ShootingAccuracyPawn>
 | 
			
		||||
        </statOffsets>
 | 
			
		||||
        <capMods>
 | 
			
		||||
          <li>
 | 
			
		||||
            <capacity>Moving</capacity>
 | 
			
		||||
            <offset>0.1</offset>
 | 
			
		||||
          </li>
 | 
			
		||||
          <li>
 | 
			
		||||
            <capacity>Consciousness</capacity>
 | 
			
		||||
            <offset>0.1</offset>
 | 
			
		||||
          </li>
 | 
			
		||||
          <li>
 | 
			
		||||
            <capacity>BloodPumping</capacity>
 | 
			
		||||
            <offset>0.1</offset>
 | 
			
		||||
          </li>
 | 
			
		||||
        </capMods>
 | 
			
		||||
      </li>
 | 
			
		||||
      
 | 
			
		||||
    </stages>
 | 
			
		||||
  </HediffDef>
 | 
			
		||||
 | 
			
		||||
</Defs>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										68
									
								
								Common/Patches/Genes/Patch_Unbreakable.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								Common/Patches/Genes/Patch_Unbreakable.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,68 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="FeelingBroken"]</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <nullifyingGenes>
 | 
			
		||||
                <li>rjw_genes_unbreakable</li>
 | 
			
		||||
            </nullifyingGenes>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="GotRaped"]</xpath>
 | 
			
		||||
		<value>  
 | 
			
		||||
            <nullifyingGenes>
 | 
			
		||||
                <li>rjw_genes_unbreakable</li>
 | 
			
		||||
            </nullifyingGenes>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="GotAnalRaped"]</xpath>
 | 
			
		||||
		<value>  
 | 
			
		||||
            <nullifyingGenes>
 | 
			
		||||
                <li>rjw_genes_unbreakable</li>
 | 
			
		||||
            </nullifyingGenes>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="GotAnalRapedByFemale"]</xpath>
 | 
			
		||||
		<value>  
 | 
			
		||||
            <nullifyingGenes>
 | 
			
		||||
                <li>rjw_genes_unbreakable</li>
 | 
			
		||||
            </nullifyingGenes>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="GotRapedUnconscious"]</xpath>
 | 
			
		||||
		<value>  
 | 
			
		||||
            <nullifyingGenes>
 | 
			
		||||
                <li>rjw_genes_unbreakable</li>
 | 
			
		||||
            </nullifyingGenes>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="HateMyRapist"]</xpath>
 | 
			
		||||
		<value>  
 | 
			
		||||
            <nullifyingGenes>
 | 
			
		||||
                <li>rjw_genes_unbreakable</li>
 | 
			
		||||
            </nullifyingGenes>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="AllowedMeToGetRaped"]</xpath>
 | 
			
		||||
		<value>  
 | 
			
		||||
            <nullifyingGenes>
 | 
			
		||||
                <li>rjw_genes_unbreakable</li>
 | 
			
		||||
            </nullifyingGenes>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
</Patch>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,44 +1,6 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    <!--TODO: The Baseline does not show up with human genitalia? -->
 | 
			
		||||
	<!--
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/XenotypeDef[defName="Baseline"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<genes>
 | 
			
		||||
				<li>rjw_genes_human_genitalia</li>
 | 
			
		||||
				<li>rjw_genes_normal_anus</li>
 | 
			
		||||
				<li>rjw_genes_normal_breasts</li>
 | 
			
		||||
				<li>rjw_genes_normal_male_genitalia</li>
 | 
			
		||||
				<li>rjw_genes_normal_female_genitalia</li>
 | 
			
		||||
			</genes>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/XenotypeDef[defName="Dirtmole"]/genes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<li>rjw_genes_human_genitalia</li>
 | 
			
		||||
			<li>rjw_genes_normal_anus</li>
 | 
			
		||||
			<li>rjw_genes_normal_breasts</li>
 | 
			
		||||
			<li>rjw_genes_normal_male_genitalia</li>
 | 
			
		||||
			<li>rjw_genes_normal_female_genitalia</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/XenotypeDef[defName="Hussar"]/genes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<li>rjw_genes_human_genitalia</li>
 | 
			
		||||
			<li>rjw_genes_normal_anus</li>
 | 
			
		||||
			<li>rjw_genes_normal_breasts</li>
 | 
			
		||||
			<li>rjw_genes_normal_male_genitalia</li>
 | 
			
		||||
			<li>rjw_genes_normal_female_genitalia</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
    
 | 
			
		||||
	-->
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/XenotypeDef[defName="Neanderthal"]/genes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
| 
						 | 
				
			
			@ -74,8 +36,21 @@
 | 
			
		|||
		<xpath>Defs/XenotypeDef[defName="Highmate"]/genes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<li>rjw_genes_hypersexual</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
<!-- Conditional Patch, only add these Genes for players with Licentia 
 | 
			
		||||
	I tried "mayRequire" but that cannot be put so fine-grained into the <li> -->
 | 
			
		||||
	<Operation Class="PatchOperationFindMod">
 | 
			
		||||
	<mods>
 | 
			
		||||
		<li>LustLicentia.RJWLabs</li>
 | 
			
		||||
	</mods>
 | 
			
		||||
	<match Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/XenotypeDef[defName="Highmate"]/genes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<li>rjw_genes_likes_cumflation</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</match>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14
									
								
								Common/Patches/Xenotypes/PatchBiotechNyaron.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								Common/Patches/Xenotypes/PatchBiotechNyaron.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
<Operation Class="PatchOperationFindMod">
 | 
			
		||||
    <mods>
 | 
			
		||||
        <li>Biotech Nyaron</li>
 | 
			
		||||
    </mods>
 | 
			
		||||
    <match Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/XenotypeDef[defName="Nyaron"]/genes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<li>rjw_genes_feline_genitalia</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</match>
 | 
			
		||||
</Operation>
 | 
			
		||||
</Patch>
 | 
			
		||||
							
								
								
									
										15
									
								
								Common/Patches/Xenotypes/PatchNarai.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								Common/Patches/Xenotypes/PatchNarai.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
<Operation Class="PatchOperationFindMod">
 | 
			
		||||
    <mods>
 | 
			
		||||
        <li>NaraiXenotype</li>
 | 
			
		||||
    </mods>
 | 
			
		||||
    <match Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/XenotypeDef[defName="Narai"]/genes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<li>rjw_genes_canine_genitalia</li>
 | 
			
		||||
			<li>rjw_genes_zoophile</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</match>
 | 
			
		||||
</Operation>
 | 
			
		||||
</Patch>
 | 
			
		||||
							
								
								
									
										17
									
								
								Common/Patches/Xenotypes/PatchPapou.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								Common/Patches/Xenotypes/PatchPapou.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
<Operation Class="PatchOperationFindMod">
 | 
			
		||||
    <mods>
 | 
			
		||||
        <li>Papou Race : emotional birds</li>
 | 
			
		||||
    </mods>
 | 
			
		||||
    <match Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/XenotypeDef[defName="papago"]/genes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<li>rjw_genes_orgasm_rush</li>
 | 
			
		||||
			<li>rjw_genes_damage</li>
 | 
			
		||||
			<li>rjw_genes_tight_female_genitalia</li>
 | 
			
		||||
			<li>rjw_genes_tight_anus</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</match>
 | 
			
		||||
</Operation>
 | 
			
		||||
</Patch>
 | 
			
		||||
							
								
								
									
										14
									
								
								Common/Patches/Xenotypes/PatchSaurid.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								Common/Patches/Xenotypes/PatchSaurid.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
<Operation Class="PatchOperationFindMod">
 | 
			
		||||
    <mods>
 | 
			
		||||
        <li>Vanilla Races Expanded - Saurid</li>
 | 
			
		||||
    </mods>
 | 
			
		||||
    <match Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/XenotypeDef[defName="VRESaurids_Saurid"]/genes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<li>rjw_genes_dragon_genitalia</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</match>
 | 
			
		||||
</Operation>
 | 
			
		||||
</Patch>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,38 +0,0 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
 | 
			
		||||
namespace RJW_BGS
 | 
			
		||||
{
 | 
			
		||||
    [StaticConstructorOnStartup]
 | 
			
		||||
    internal static class First
 | 
			
		||||
    {
 | 
			
		||||
        static First()
 | 
			
		||||
        {
 | 
			
		||||
            //RJWcopy.Racegroupdictbuilder();
 | 
			
		||||
            //Prints all found race dicts (debugging only)
 | 
			
		||||
            //logAllFoundRaceGroupGenes
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private static void logAllFoundRaceGroupGenes()
 | 
			
		||||
        {
 | 
			
		||||
            foreach (RaceGroupDef def in DefDatabase<RaceGroupDef>.AllDefs)
 | 
			
		||||
            {
 | 
			
		||||
                Log.Message("defName = " + def.defName);
 | 
			
		||||
                if (def.raceNames != null)
 | 
			
		||||
                {
 | 
			
		||||
                    foreach (string race in def.raceNames)
 | 
			
		||||
                    {
 | 
			
		||||
                        Log.Message(race);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -5,6 +5,7 @@ using System.Text;
 | 
			
		|||
using System.Threading.Tasks;
 | 
			
		||||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
 | 
			
		||||
namespace RJW_BGS
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -120,5 +121,22 @@ namespace RJW_BGS
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Used only for debugging, to see what you loaded and how it looks.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        private static void logAllFoundRaceGroupGenes()
 | 
			
		||||
        {
 | 
			
		||||
            foreach (RaceGroupDef def in DefDatabase<RaceGroupDef>.AllDefs)
 | 
			
		||||
            {
 | 
			
		||||
                Log.Message("defName = " + def.defName);
 | 
			
		||||
                if (def.raceNames != null)
 | 
			
		||||
                {
 | 
			
		||||
                    foreach (string race in def.raceNames)
 | 
			
		||||
                    {
 | 
			
		||||
                        Log.Message(race);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,20 +29,21 @@ namespace RJW_BGS
 | 
			
		|||
                        baby.genes = new Pawn_GeneTracker(baby);
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    //Remove the hair and skin genes pawns always start with, should get correct ones from human parent anyway.
 | 
			
		||||
                    for (int i = baby.genes.Endogenes.Count - 1; i >= 0; i--)
 | 
			
		||||
                    {
 | 
			
		||||
                        baby.genes.RemoveGene(baby.genes.Endogenes[i]);
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    List<GeneDef> genes = PregnancyUtility.GetInheritedGenes(dad, mother);
 | 
			
		||||
                    List<GeneDef> humangenes = PregnancyUtility.GetInheritedGenes(dad, mother);
 | 
			
		||||
                    List<GeneDef> beastgenes = InheritanceUtility.AnimalInheritedGenes(dad, mother);
 | 
			
		||||
                    InheritanceUtility.AddGenes(baby, beastgenes);
 | 
			
		||||
                    InheritanceUtility.AddGenes(baby, genes);
 | 
			
		||||
                    //foreach (GeneDef gene in genes)
 | 
			
		||||
                    //{
 | 
			
		||||
                    //    baby.genes.AddGene(gene, false);
 | 
			
		||||
                    //}
 | 
			
		||||
                    InheritanceUtility.AddGenes(baby, humangenes);
 | 
			
		||||
 | 
			
		||||
                    // The mix-breed babies should be labelled hybrids
 | 
			
		||||
                    baby.genes.hybrid = true;
 | 
			
		||||
                    baby.genes.xenotypeName = "Hybrid";
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,11 +1,8 @@
 | 
			
		|||
using System;
 | 
			
		||||
using rjw;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
 | 
			
		||||
namespace RJW_BGS
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -44,6 +41,7 @@ namespace RJW_BGS
 | 
			
		|||
			}).ToList<RaceGeneDef>();
 | 
			
		||||
			if (pawnKindDefs.Count() > 0)
 | 
			
		||||
				return pawnKindDefs;
 | 
			
		||||
 | 
			
		||||
			List<RaceGeneDef> raceKindDefs = allDefs.Where(delegate (RaceGeneDef group)
 | 
			
		||||
			{
 | 
			
		||||
				List<string> raceNames = group.raceNames;
 | 
			
		||||
| 
						 | 
				
			
			@ -51,6 +49,7 @@ namespace RJW_BGS
 | 
			
		|||
			}).ToList<RaceGeneDef>();
 | 
			
		||||
			if (raceKindDefs.Count() > 0)
 | 
			
		||||
				return raceKindDefs;
 | 
			
		||||
 | 
			
		||||
			List<RaceGeneDef> raceGroupDefs = new List<RaceGeneDef>();
 | 
			
		||||
			if (raceGroupDef != null)
 | 
			
		||||
			{
 | 
			
		||||
| 
						 | 
				
			
			@ -62,8 +61,10 @@ namespace RJW_BGS
 | 
			
		|||
							|| (list_raceGroupDefName != null && list_raceGroupDefName.Contains(raceGroupDef.defName));
 | 
			
		||||
				}).ToList<RaceGeneDef>();
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if (raceGroupDefs.Count() > 0)
 | 
			
		||||
				return raceGroupDefs;
 | 
			
		||||
 | 
			
		||||
			return new List<RaceGeneDef>();
 | 
			
		||||
		}
 | 
			
		||||
    } 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										34
									
								
								Source/Common/ModLog.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								Source/Common/ModLog.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    internal class ModLog
 | 
			
		||||
	{
 | 
			
		||||
		public static string ModId => "RJW-Genes";
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// Logs the given message with [SaveStorage.ModId] appended.
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		public static void Error(string message)
 | 
			
		||||
		{
 | 
			
		||||
			Log.Error($"[{ModId}] {message}");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// Logs the given message with [SaveStorage.ModId] appended.
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		public static void Message(string message)
 | 
			
		||||
		{
 | 
			
		||||
			Log.Message($"[{ModId}] {message}");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// Logs the given message with [SaveStorage.ModId] appended.
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		public static void Warning(string message)
 | 
			
		||||
		{
 | 
			
		||||
			Log.Warning($"[{ModId}] {message}");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -51,6 +51,7 @@ namespace RJW_Genes
 | 
			
		|||
		public static readonly GeneDef rjw_genes_mechbreeder;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_insectincubator;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_insectbreeder;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_zoophile;
 | 
			
		||||
 | 
			
		||||
		// Cum 
 | 
			
		||||
		public static readonly GeneDef rjw_genes_no_cum;
 | 
			
		||||
| 
						 | 
				
			
			@ -63,13 +64,20 @@ namespace RJW_Genes
 | 
			
		|||
		// Reproduction 
 | 
			
		||||
		public static readonly GeneDef rjw_genes_hypersexual;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_rapist;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_zoophile;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_homosexual;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_bisexual;
 | 
			
		||||
 | 
			
		||||
		// Damage & Side Effects 
 | 
			
		||||
		[MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_elasticity;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_unbreakable;
 | 
			
		||||
 | 
			
		||||
		// Special
 | 
			
		||||
		public static readonly GeneDef rjw_genes_orgasm_rush;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_youth_fountain;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_sex_age_drain;
 | 
			
		||||
		public static readonly GeneDef rjw_genes_aphrodisiac_pheromones;
 | 
			
		||||
 | 
			
		||||
    // Others & Non-Genes
 | 
			
		||||
		public static readonly HediffDef rjw_genes_orgasm_rush_hediff;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,8 @@ namespace RJW_Genes
 | 
			
		|||
    /// Normal Egg-Pregnancy logic is in https://gitgud.io/Ed86/rjw/-/blob/master/1.4/Source/Modules/Pregnancy/Pregnancy_Helper.cs
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [HarmonyPatch(typeof(SexUtility), "Aftersex")]
 | 
			
		||||
    static class PatchEggFertilizationHelper
 | 
			
		||||
    static class Patch_EggFertilization
 | 
			
		||||
    {
 | 
			
		||||
        [HarmonyTranspiler]
 | 
			
		||||
        public static void Postfix(SexProps props)
 | 
			
		||||
        {
 | 
			
		||||
            // Only Fertilize on vaginal / anal sex
 | 
			
		||||
| 
						 | 
				
			
			@ -59,7 +58,7 @@ namespace RJW_Genes
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        private static Boolean canDoEggFertilization(Pawn a, Pawn b)
 | 
			
		||||
        private static bool canDoEggFertilization(Pawn a, Pawn b)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            // No Partner / Other Errors
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,8 +10,6 @@ namespace RJW_Genes
 | 
			
		|||
    /// </summary>
 | 
			
		||||
    public class Gene_Elasticity : Gene
 | 
			
		||||
    {
 | 
			
		||||
        
 | 
			
		||||
        private int ticksToReset = RESET_INTERVAL; 
 | 
			
		||||
        private const int RESET_INTERVAL = 60000; // 60k should be 1 day 
 | 
			
		||||
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
| 
						 | 
				
			
			@ -26,10 +24,7 @@ namespace RJW_Genes
 | 
			
		|||
        public override void Tick()
 | 
			
		||||
        {
 | 
			
		||||
            base.Tick();
 | 
			
		||||
            --this.ticksToReset;
 | 
			
		||||
            if (this.ticksToReset > 0)
 | 
			
		||||
                return;
 | 
			
		||||
            this.ticksToReset = RESET_INTERVAL;
 | 
			
		||||
            if (pawn.IsHashIntervalTick(RESET_INTERVAL))
 | 
			
		||||
                ResetSeverity();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										41
									
								
								Source/Genes/Damage/Gene_Unbreakable.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								Source/Genes/Damage/Gene_Unbreakable.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,41 @@
 | 
			
		|||
using LicentiaLabs;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// This Gene regularly removes the broken hediff of a pawn. 
 | 
			
		||||
    /// Blocking / Removing thoughts are done in an XML Patch.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class Gene_Unbreakable : Gene
 | 
			
		||||
    {
 | 
			
		||||
        /// DevNote: I first tried to Harmony-Postfix the AfterSexUtility and never add it - but that failed? 
 | 
			
		||||
 | 
			
		||||
        private const int RESET_INTERVAL = 30000; // 30k should be 0.5 day 
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            RemoveBrokenHediff();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void Tick()
 | 
			
		||||
        {
 | 
			
		||||
            base.Tick();
 | 
			
		||||
            if (pawn.IsHashIntervalTick(RESET_INTERVAL))
 | 
			
		||||
                RemoveBrokenHediff();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        private void RemoveBrokenHediff()
 | 
			
		||||
        {
 | 
			
		||||
            // Clean-Up of existing feeling brokens
 | 
			
		||||
            var maybeBrokenHediff = pawn.health.hediffSet.GetFirstHediffOfDef(xxx.feelingBroken);
 | 
			
		||||
            if (maybeBrokenHediff != null)
 | 
			
		||||
            {
 | 
			
		||||
                pawn.health.RemoveHediff(maybeBrokenHediff);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -13,6 +13,12 @@ namespace RJW_Genes
 | 
			
		|||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
 | 
			
		||||
            // If the Pawn is already a Futa, do not do anything. Can Happen by Base-RJW Spawn Chance or potentially races / other mods. 
 | 
			
		||||
            if (IsAlreadyFuta(pawn))
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (GenderUtility.IsFemale(pawn) && additional_genital == null)
 | 
			
		||||
            {
 | 
			
		||||
                createAndAddPenis();
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +33,12 @@ namespace RJW_Genes
 | 
			
		|||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
 | 
			
		||||
            // If the Pawn is already a Futa, do not do anything. Can Happen by Base-RJW Spawn Chance or potentially races / other mods. 
 | 
			
		||||
            if (IsAlreadyFuta(pawn))
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (pawn.gender == Gender.Female && additional_genital == null)
 | 
			
		||||
            {
 | 
			
		||||
                createAndAddPenis();
 | 
			
		||||
| 
						 | 
				
			
			@ -79,5 +91,15 @@ namespace RJW_Genes
 | 
			
		|||
            pawn.health.AddHediff(additional_genital, partBPR);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private static bool IsAlreadyFuta(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn == null)
 | 
			
		||||
                return false;
 | 
			
		||||
            if (!Genital_Helper.has_genitals(pawn))
 | 
			
		||||
                return false;
 | 
			
		||||
            return 
 | 
			
		||||
                (Genital_Helper.has_penis_fertile(pawn) || Genital_Helper.has_penis_infertile(pawn)) 
 | 
			
		||||
                && Genital_Helper.has_vagina(pawn) ;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
| 
						 | 
				
			
			@ -23,6 +24,24 @@ namespace RJW_Genes
 | 
			
		|||
            return pawn.genes.HasGene(GeneDefOf.rjw_genes_insectincubator);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static bool IsYouthFountain(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn.genes == null)
 | 
			
		||||
            {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            return pawn.genes.HasGene(GeneDefOf.rjw_genes_youth_fountain);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static bool IsAgeDrainer(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn.genes == null)
 | 
			
		||||
            {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            return pawn.genes.HasGene(GeneDefOf.rjw_genes_sex_age_drain);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static bool IsInsectBreeder(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn.genes == null)
 | 
			
		||||
| 
						 | 
				
			
			@ -67,5 +86,35 @@ namespace RJW_Genes
 | 
			
		|||
            }
 | 
			
		||||
            return pawn.genes.HasGene(GeneDefOf.rjw_genes_generous_donor);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static bool IsUnbreakable(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn.genes == null)
 | 
			
		||||
            {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            return pawn.genes.HasGene(GeneDefOf.rjw_genes_unbreakable);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public static bool HasGenitaliaResizingGenes(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            return !GetGenitaliaResizingGenes(pawn).NullOrEmpty();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static List<Gene_GenitaliaResizingGene> GetGenitaliaResizingGenes(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            var ResizingGenes = new List<Gene_GenitaliaResizingGene>();
 | 
			
		||||
 | 
			
		||||
            // Error Handling: Issue with Pawn or Genes return empty.
 | 
			
		||||
            if (pawn == null || pawn.genes == null)
 | 
			
		||||
                return ResizingGenes;
 | 
			
		||||
 | 
			
		||||
            foreach (Gene gene in pawn.genes.GenesListForReading)
 | 
			
		||||
                if (gene is Gene_GenitaliaResizingGene resizing_gene)
 | 
			
		||||
                    ResizingGenes.Add(resizing_gene);
 | 
			
		||||
 | 
			
		||||
            return ResizingGenes;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,24 +1,12 @@
 | 
			
		|||
using Verse;
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class Gene_BigBreasts : RJW_Gene
 | 
			
		||||
    public class Gene_BigBreasts : Gene_GenitaliaResizingGene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public override void PostMake()
 | 
			
		||||
        public override void Resize()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
 | 
			
		||||
            if (pawn.gender == Gender.Female)
 | 
			
		||||
                SizeAdjuster.AdjustAllBreastSizes(pawn,0.5f,1.0f);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            if (pawn.gender == Gender.Female)
 | 
			
		||||
                SizeAdjuster.AdjustAllBreastSizes(pawn, 0.5f, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,20 +1,10 @@
 | 
			
		|||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class Gene_BigMaleGenitalia : RJW_Gene
 | 
			
		||||
    public class Gene_BigMaleGenitalia : Gene_GenitaliaResizingGene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public override void PostMake()
 | 
			
		||||
        public override void Resize()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
 | 
			
		||||
            SizeAdjuster.AdjustAllPenisSizes(pawn,0.5f,1.0f);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            SizeAdjuster.AdjustAllPenisSizes(pawn, 0.5f, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										49
									
								
								Source/Genes/GenitaliaSize/Gene_GenitaliaResizingGene.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								Source/Genes/GenitaliaSize/Gene_GenitaliaResizingGene.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,49 @@
 | 
			
		|||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Parent Gene for Genitalia Resizing. All Resizing genes should inherit for this class. 
 | 
			
		||||
    /// 
 | 
			
		||||
    /// This helps with some functions (e.g. "hasGenitaliaResizingGenes(pawn)") but also to fire genitalia resizing later in life for Pawns. 
 | 
			
		||||
    /// (No Children with huge ding dongs, and I don't want kids with tight anuses I am not that degenerate)
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public abstract class Gene_GenitaliaResizingGene : RJW_Gene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public const int RESIZING_AGE = 20;
 | 
			
		||||
        public bool WasApplied { get; set; }
 | 
			
		||||
 | 
			
		||||
        public override void PostMake()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
            if (pawn.ageTracker.AgeBiologicalYears >= RESIZING_AGE)
 | 
			
		||||
            {
 | 
			
		||||
                Resize();
 | 
			
		||||
                WasApplied = true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            if (pawn.ageTracker.AgeBiologicalYears >= RESIZING_AGE)
 | 
			
		||||
            {
 | 
			
		||||
                Resize();
 | 
			
		||||
                WasApplied = true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Used to resize the pawns genitalia. 
 | 
			
		||||
        /// All Logic should be put here: 
 | 
			
		||||
        /// 1. Filters for Gender
 | 
			
		||||
        /// 2. Filters for Genitalia Existance
 | 
			
		||||
        /// 3. Selection of right Genitalia 
 | 
			
		||||
        /// 4. Adjustment of Size
 | 
			
		||||
        /// 
 | 
			
		||||
        /// I kept it intentionally broad, so that e.g. the Penis Resize can resize multiple penises and also for futas, 
 | 
			
		||||
        /// while the breast-gene is female only. 
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public abstract void Resize();
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,22 +1,12 @@
 | 
			
		|||
namespace RJW_Genes
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class Gene_LooseAnus : RJW_Gene
 | 
			
		||||
    public class Gene_LooseAnus : Gene_GenitaliaResizingGene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public override void PostMake()
 | 
			
		||||
        public override void Resize()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
 | 
			
		||||
            SizeAdjuster.AdjustAllAnusSizes(pawn, 0.5f, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            SizeAdjuster.AdjustAllAnusSizes(pawn, 0.5f, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,22 +1,12 @@
 | 
			
		|||
namespace RJW_Genes
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class Gene_LooseFemaleGenitalia : RJW_Gene
 | 
			
		||||
    public class Gene_LooseFemaleGenitalia : Gene_GenitaliaResizingGene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public override void PostMake()
 | 
			
		||||
        public override void Resize()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
 | 
			
		||||
            SizeAdjuster.AdjustAllVaginaSizes(pawn, 0.5f, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            SizeAdjuster.AdjustAllVaginaSizes(pawn, 0.5f, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,18 +1,11 @@
 | 
			
		|||
namespace RJW_Genes
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class Gene_SmallBreasts : RJW_Gene
 | 
			
		||||
    public class Gene_SmallBreasts : Gene_GenitaliaResizingGene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public override void PostMake()
 | 
			
		||||
        public override void Resize()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
 | 
			
		||||
            SizeAdjuster.AdjustAllBreastSizes(pawn, 0.0f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            SizeAdjuster.AdjustAllBreastSizes(pawn, 0.0f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,20 +1,10 @@
 | 
			
		|||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class Gene_SmallMaleGenitalia : RJW_Gene
 | 
			
		||||
    public class Gene_SmallMaleGenitalia : Gene_GenitaliaResizingGene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public override void PostMake()
 | 
			
		||||
        public override void Resize()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
 | 
			
		||||
            SizeAdjuster.AdjustAllPenisSizes(pawn,0.0f,0.5f);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            SizeAdjuster.AdjustAllPenisSizes(pawn, 0.0f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,21 +1,10 @@
 | 
			
		|||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class Gene_TightAnus : RJW_Gene
 | 
			
		||||
    public class Gene_TightAnus : Gene_GenitaliaResizingGene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public override void PostMake()
 | 
			
		||||
        public override void Resize()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
 | 
			
		||||
            SizeAdjuster.AdjustAllAnusSizes(pawn, 0.0f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            SizeAdjuster.AdjustAllAnusSizes(pawn, 0.0f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,20 +1,10 @@
 | 
			
		|||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class Gene_TightFemaleGenitalia : RJW_Gene
 | 
			
		||||
    public class Gene_TightFemaleGenitalia : Gene_GenitaliaResizingGene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public override void PostMake()
 | 
			
		||||
        public override void Resize()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
 | 
			
		||||
            SizeAdjuster.AdjustAllVaginaSizes(pawn, 0.0f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            SizeAdjuster.AdjustAllVaginaSizes(pawn, 0.0f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										30
									
								
								Source/Genes/GenitaliaSize/Patch_ResizingOnAdulthood.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								Source/Genes/GenitaliaSize/Patch_ResizingOnAdulthood.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
using HarmonyLib;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// This Patch adds behavior to all resizing genes: 
 | 
			
		||||
    /// At Age RESIZING_MIN_AGE the Pawns Resizing Genes will trigger again, if not already triggered somewhere else.
 | 
			
		||||
    /// This is meant to allow kids to grow up without resized genitals, and resize later (Fixing #11). 
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [HarmonyPatch(typeof(Pawn_AgeTracker), "BirthdayBiological")]
 | 
			
		||||
    public class Patch_ResizingOnAdulthood
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        static void Postfix(Pawn ___pawn, int birthdayAge)
 | 
			
		||||
        {
 | 
			
		||||
            if (birthdayAge >= Gene_GenitaliaResizingGene.RESIZING_AGE)
 | 
			
		||||
            {
 | 
			
		||||
                foreach(Gene_GenitaliaResizingGene gene in GeneUtility.GetGenitaliaResizingGenes(___pawn))
 | 
			
		||||
                {
 | 
			
		||||
                    if (!gene.WasApplied)
 | 
			
		||||
                    {
 | 
			
		||||
                        gene.Resize();
 | 
			
		||||
                        gene.WasApplied = true;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										40
									
								
								Source/Genes/Special/Patch_AgeDrain.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								Source/Genes/Special/Patch_AgeDrain.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,40 @@
 | 
			
		|||
using HarmonyLib;
 | 
			
		||||
using rjw;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes.Genes.Special
 | 
			
		||||
{
 | 
			
		||||
    [HarmonyPatch(typeof(SexUtility), "Aftersex")]
 | 
			
		||||
    public static class Patch_AgeDrain
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        const long AGE_TRANSFERED = 120000; // 120k == 2 days
 | 
			
		||||
        // 20 Years * 60 Days / Year * 60k Ticks/Day + 1 for safety
 | 
			
		||||
        const long MINIMUM_AGE = 20 * 60 * 60000 + 1;
 | 
			
		||||
 | 
			
		||||
        // Comment Below in for debugging, changes years
 | 
			
		||||
        // const long AGE_TRANSFERED = 12000000; 
 | 
			
		||||
        public static void Postfix(SexProps props)
 | 
			
		||||
        {
 | 
			
		||||
            if (props == null || props.pawn == null || props.partner == null || props.partner.IsAnimal() )
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            if (GeneUtility.IsAgeDrainer(props.pawn))
 | 
			
		||||
            {
 | 
			
		||||
                var pawnAge = props.pawn.ageTracker.AgeBiologicalTicks;
 | 
			
		||||
                //ModLog.Error($"Firing Age Drain \nMinimum Age is \t{MINIMUM_AGE} \nPawn Age is \t{pawnAge} \nTransferred \t{AGE_TRANSFERED}\nResulting in \t{pawnAge - AGE_TRANSFERED}");
 | 
			
		||||
 | 
			
		||||
                // Make Partner older
 | 
			
		||||
                props.partner.ageTracker.AgeBiologicalTicks += AGE_TRANSFERED;
 | 
			
		||||
                // Make Pawn younger
 | 
			
		||||
                props.pawn.ageTracker.AgeBiologicalTicks = Math.Max(MINIMUM_AGE, (pawnAge - AGE_TRANSFERED));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -5,6 +5,7 @@ using System.Collections.Generic;
 | 
			
		|||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -14,6 +15,7 @@ namespace RJW_Genes
 | 
			
		|||
	{
 | 
			
		||||
 | 
			
		||||
		private const float REST_INCREASE = 0.05f;
 | 
			
		||||
		private const float ORGASMS_NEEDED_FOR_SUPERCHARGE = 3.0f;
 | 
			
		||||
 | 
			
		||||
		public static void Postfix(SexProps props)
 | 
			
		||||
		{
 | 
			
		||||
| 
						 | 
				
			
			@ -23,9 +25,37 @@ namespace RJW_Genes
 | 
			
		|||
 | 
			
		||||
			if (props.pawn.genes != null && props.pawn.genes.HasGene(GeneDefOf.rjw_genes_orgasm_rush))
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
				// Pump up Wake-Ness
 | 
			
		||||
				if (props.pawn.needs.rest != null)
 | 
			
		||||
					props.pawn.needs.rest.CurLevel += REST_INCREASE;
 | 
			
		||||
 | 
			
		||||
				// Add or Update Hediff for Orgasm Rush
 | 
			
		||||
				Hediff rush = GetOrgasmRushHediff(props.pawn);
 | 
			
		||||
				float added_severity = props.orgasms / ORGASMS_NEEDED_FOR_SUPERCHARGE;
 | 
			
		||||
				rush.Severity += added_severity;
 | 
			
		||||
				// Severity should be capped to 1 by the XML logic
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// Helps to get the Orgasm Rush Hediff of a Pawn. If it does not exist, one is added. 
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		/// <param name="orgasmed">The pawn that had the orgasm, for which a hediff is looked up or created.</param>
 | 
			
		||||
		/// <returns></returns>
 | 
			
		||||
		public static Hediff GetOrgasmRushHediff(Pawn orgasmed)
 | 
			
		||||
		{
 | 
			
		||||
			Hediff orgasmRushHediff = orgasmed.health.hediffSet.GetFirstHediffOfDef(GeneDefOf.rjw_genes_orgasm_rush_hediff);
 | 
			
		||||
			if (orgasmRushHediff == null)
 | 
			
		||||
			{
 | 
			
		||||
				orgasmRushHediff = HediffMaker.MakeHediff(GeneDefOf.rjw_genes_orgasm_rush_hediff, orgasmed);
 | 
			
		||||
				orgasmRushHediff.Severity = 0;
 | 
			
		||||
				orgasmed.health.AddHediff(orgasmRushHediff);
 | 
			
		||||
			}
 | 
			
		||||
			return orgasmRushHediff;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										44
									
								
								Source/Genes/Special/Patch_Youth_Fountain.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								Source/Genes/Special/Patch_Youth_Fountain.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,44 @@
 | 
			
		|||
using HarmonyLib;
 | 
			
		||||
using rjw;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes.Genes.Special
 | 
			
		||||
{
 | 
			
		||||
    [HarmonyPatch(typeof(SexUtility), "Aftersex")]
 | 
			
		||||
    public static class Patch_Youth_Fountain
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        const long AGE_REDUCTION = 60000; // 60k == 1 day
 | 
			
		||||
        // 20 Years * 60 Days / Year * 60k Ticks/Day + 1 for safety
 | 
			
		||||
        const long MINIMUM_AGE = 20 * 60 * 60000 + 1;
 | 
			
		||||
 | 
			
		||||
        // Comment Below in for debugging
 | 
			
		||||
        // const long AGE_REDUCTION = 6000000; // 6000k == 100 days
 | 
			
		||||
        public static void Postfix(SexProps props)
 | 
			
		||||
        {
 | 
			
		||||
            if (props == null || props.pawn == null || props.partner == null || props.partner.IsAnimal())
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            if (GeneUtility.IsYouthFountain(props.pawn))
 | 
			
		||||
            {
 | 
			
		||||
                var partnerAge = props.partner.ageTracker.AgeBiologicalTicks;
 | 
			
		||||
 | 
			
		||||
                //ModLog.Error($"Firing Youth Fountain \nMinimum Age is \t{MINIMUM_AGE}\t{ticksToYears(MINIMUM_AGE)}y\nPawn Age is \t{partnerAge}\t{ticksToYears(partnerAge)}y \nTransferred \t {AGE_REDUCTION}\t{ticksToYears(AGE_REDUCTION)}y\nResulting in \t{partnerAge - AGE_REDUCTION}\t{ticksToYears(partnerAge - AGE_REDUCTION)}y");
 | 
			
		||||
 | 
			
		||||
                props.partner.ageTracker.AgeBiologicalTicks = Math.Max(MINIMUM_AGE, partnerAge - AGE_REDUCTION);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private static float ticksToYears(long ticks)
 | 
			
		||||
        {
 | 
			
		||||
            return (ticks / 60000f) / 60f;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -27,16 +27,14 @@
 | 
			
		|||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="Assembly-CSharp">
 | 
			
		||||
      <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
      <HintPath>..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="LicentiaLabs">
 | 
			
		||||
      <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\licentia-labs-master\Assemblies\LicentiaLabs.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="RJW">
 | 
			
		||||
      <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\rjw-master\1.4\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
      <HintPath>..\..\rjw\1.4\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="System" />
 | 
			
		||||
    <Reference Include="System.Core" />
 | 
			
		||||
| 
						 | 
				
			
			@ -51,12 +49,14 @@
 | 
			
		|||
    <None Include="..\Common\Languages\**" />
 | 
			
		||||
    <None Include="..\Common\Patches\**" />
 | 
			
		||||
    <Reference Include="UnityEngine">
 | 
			
		||||
      <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
 | 
			
		||||
      <HintPath>..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="UnityEngine.CoreModule">
 | 
			
		||||
      <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
      <HintPath>..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="UnityEngine.IMGUIModule">
 | 
			
		||||
      <HintPath>..\..\..\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
 | 
			
		||||
    </Reference>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue