mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Merge branch 'dev' of https://github.com/vegapnk/RJW-Genes into bs-support
This commit is contained in:
		
						commit
						620f2daab2
					
				
					 39 changed files with 1176 additions and 196 deletions
				
			
		| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
			
		||||
<Manifest>
 | 
			
		||||
	<identifier>RJW-Genes</identifier>
 | 
			
		||||
	<version>1.3.1</version>
 | 
			
		||||
	<version>2.0.0</version>
 | 
			
		||||
	<dependencies>
 | 
			
		||||
        <li>RimJobWorld</li>
 | 
			
		||||
		<li>HugsLib</li>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										17
									
								
								CHANGELOG.md
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								CHANGELOG.md
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,5 +1,13 @@
 | 
			
		|||
# 2.0.0
 | 
			
		||||
 | 
			
		||||
**Summary**:
 | 
			
		||||
 | 
			
		||||
- 1.5 Support 
 | 
			
		||||
- Femboys, MPReg
 | 
			
		||||
- Couple Implants around Fertility / Sex / Pregnancy
 | 
			
		||||
- Hive Removal (to be reintroduced somewhere else)
 | 
			
		||||
- Licentia Genes became placeholders, no functions until Licentia is on 1.5
 | 
			
		||||
 | 
			
		||||
**Additions**: 
 | 
			
		||||
 | 
			
		||||
- initial Rimworld 1.5 thanks to @jaaldabaoth
 | 
			
		||||
| 
						 | 
				
			
			@ -12,7 +20,7 @@
 | 
			
		|||
- LimbicStimulator / Scrambler thanks to @jaaldabaoth. See [Scrambler Description](Common/Defs/ThingDefs/Scrambler.xml) and [Limbic Stimulator](./Common/Defs/ThingDefs/LimbicStimulator.xml)
 | 
			
		||||
- Bioscaffold that allows for faster pregnancies. thanks to @jaaldabaoth. See [its description](./Common/Defs/ThingDefs/Bioscaffold.xml)
 | 
			
		||||
- Multi-Pregnancy Gene thanks to @jaaldabaoth
 | 
			
		||||
 | 
			
		||||
- Many genes have settings configurable in their xml - tick speeds and distances.
 | 
			
		||||
 | 
			
		||||
**Changes**: 
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -21,16 +29,19 @@
 | 
			
		|||
- Highmates "Initiate Loving" uses Succubus "Seduce" ability, thanks to @jaaldabaoth
 | 
			
		||||
- Slider for Evergrowth Tick-Speed, thanks to @jaaldabaoth
 | 
			
		||||
- Resizing Age for resizing Genes can be set in Settings @jaaldabaoth
 | 
			
		||||
- Licentia-Stretching related genes are only placeholders, as Licentia is not 1.5 yet
 | 
			
		||||
- **Licentia related genes are only placeholders**, as Licentia is not 1.5 yet
 | 
			
		||||
- InsectIncubator only does self-fertilization now, but does not increase storage capacities for eggs anymore
 | 
			
		||||
- Some Genes (GenitaliaTypes, Cum, some others) cannot be in quest-rewards anymore. Special, Size, Breeding and Lifeforce genes still can be quest rewards.
 | 
			
		||||
 | 
			
		||||
**Fixes:** 
 | 
			
		||||
 | 
			
		||||
- Small changes to drawing Succubus Wings
 | 
			
		||||
- Minor Format changes to lots of XML files
 | 
			
		||||
- Pawns with ONLY an Archotech penis will not give Fertilin, and will not receive debuffs (Fixes #71)
 | 
			
		||||
 | 
			
		||||
**Hidden Changes:** 
 | 
			
		||||
 | 
			
		||||
- Patches for "Same Mother" / "Same Father" to account for Male-Pregs. This should only extend behaviour but be warned. 
 | 
			
		||||
- Patches for "Same Mother" / "Same Father" to account for Male-Pregs. This should only extend behaviour but be warned a bit. 
 | 
			
		||||
- Patches to RJW-Pregnancy Helper to account for Male Pregs. 
 | 
			
		||||
- Some replacements from `hasGene` to `hasActiveGene` 
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,8 @@ But please consider also the following:
 | 
			
		|||
 | 
			
		||||
- Shabalox (MechBreeding, InsectBreeding, Animal Gene Inheritance)
 | 
			
		||||
- WasMachenDennSachen (Various Icons)
 | 
			
		||||
- Jaaldabaoth (1.5 Migration, MPreg, Femboys)
 | 
			
		||||
- Flock-of-Birds (Cosmetic Genitalia per XML)
 | 
			
		||||
 | 
			
		||||
## Other Credits 
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										34
									
								
								Common/Defs/AbilityDefs/Ability_CocoonWeaver.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								Common/Defs/AbilityDefs/Ability_CocoonWeaver.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Defs>
 | 
			
		||||
  <AbilityDef ParentName="AbilityTouchBase">
 | 
			
		||||
    <defName>rjw_genes_ability_cocoonweaver</defName>
 | 
			
		||||
    <label>Cocoon</label>
 | 
			
		||||
    <description>Weaves the victim into a (self-sustaining) cocoon. The victim cannot move, but can be bred.</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Cocoon</iconPath>
 | 
			
		||||
    <stunTargetWhileCasting>true</stunTargetWhileCasting>
 | 
			
		||||
    <displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
 | 
			
		||||
    <disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
 | 
			
		||||
    <warmupMote>Mote_CocoonStencil</warmupMote>
 | 
			
		||||
    <warmupEffecter>CocoonWeave</warmupEffecter>
 | 
			
		||||
    <jobDef>CastAbilityOnThingMelee</jobDef>
 | 
			
		||||
    <displayOrder>404</displayOrder>
 | 
			
		||||
    <!-- 30k Ticks = 12h -->
 | 
			
		||||
    <cooldownTicksRange>30000</cooldownTicksRange>
 | 
			
		||||
    <verbProperties>
 | 
			
		||||
      <verbClass>Verb_CastAbilityTouch</verbClass>
 | 
			
		||||
      <drawAimPie>false</drawAimPie>
 | 
			
		||||
      <range>-1</range>
 | 
			
		||||
      <warmupTime>15</warmupTime>
 | 
			
		||||
      <targetParams>
 | 
			
		||||
        <canTargetAnimals>true</canTargetAnimals>
 | 
			
		||||
        <canTargetSelf>false</canTargetSelf>
 | 
			
		||||
        <canTargetBuildings>false</canTargetBuildings>
 | 
			
		||||
        <canTargetMechs>false</canTargetMechs>
 | 
			
		||||
        <canTargetBloodfeeders>true</canTargetBloodfeeders>
 | 
			
		||||
      </targetParams>
 | 
			
		||||
    </verbProperties>
 | 
			
		||||
    <comps>
 | 
			
		||||
      <li Class="RJW_Genes.CompProperties_AbilityCocoonWeaver"/>
 | 
			
		||||
    </comps>
 | 
			
		||||
  </AbilityDef>
 | 
			
		||||
</Defs>
 | 
			
		||||
							
								
								
									
										37
									
								
								Common/Defs/Effects/cocoonweave.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								Common/Defs/Effects/cocoonweave.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,37 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Defs>
 | 
			
		||||
 | 
			
		||||
  <EffecterDef>
 | 
			
		||||
    <defName>CocoonWeave</defName>
 | 
			
		||||
    <children>
 | 
			
		||||
      <li>
 | 
			
		||||
        <subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
 | 
			
		||||
        <fleckDef>BloodSplash</fleckDef>
 | 
			
		||||
        <chancePerTick>0.15</chancePerTick>
 | 
			
		||||
        <burstCount>2~3</burstCount>
 | 
			
		||||
        <scale>0.75~1.5</scale>
 | 
			
		||||
        <color>(244, 244, 244)</color>
 | 
			
		||||
        <spawnLocType>RandomDrawPosOnTarget</spawnLocType>
 | 
			
		||||
        <attachToSpawnThing>true</attachToSpawnThing>
 | 
			
		||||
      </li>
 | 
			
		||||
    </children>
 | 
			
		||||
  </EffecterDef>
 | 
			
		||||
 | 
			
		||||
  <ThingDef ParentName="MoteBase">
 | 
			
		||||
    <defName>Mote_CocoonStencil</defName>
 | 
			
		||||
    <thingClass>MoteAttached</thingClass>
 | 
			
		||||
    <altitudeLayer>Terrain</altitudeLayer>
 | 
			
		||||
    <mote>
 | 
			
		||||
      <fadeInTime>0.1</fadeInTime>
 | 
			
		||||
      <fadeOutTime>0.4</fadeOutTime>
 | 
			
		||||
      <solidTime>999999</solidTime>
 | 
			
		||||
      <needsMaintenance>True</needsMaintenance>
 | 
			
		||||
    </mote>
 | 
			
		||||
    <graphicData>
 | 
			
		||||
      <graphicClass>Graphic_PawnBodySilhouette</graphicClass>
 | 
			
		||||
      <shaderType>PawnSilhouetteStencil</shaderType>
 | 
			
		||||
      <texPath>Things/Mote/Transparent</texPath>
 | 
			
		||||
    </graphicData>
 | 
			
		||||
  </ThingDef>
 | 
			
		||||
 | 
			
		||||
</Defs>
 | 
			
		||||
| 
						 | 
				
			
			@ -2,28 +2,31 @@
 | 
			
		|||
<Defs>
 | 
			
		||||
  <!-- rjw_genes_mechbreeder,rjw_genes_insectincubator and rjw_genes_insectbreeder were kindly supplied by `Shabalox` https://github.com/Shabalox/RJW_Genes_Addons/ -->
 | 
			
		||||
 | 
			
		||||
  <GeneDef>
 | 
			
		||||
  <GeneDef Name="BreedingBase" Abstract="True">
 | 
			
		||||
		<displayCategory>rjw_genes_breeding</displayCategory>
 | 
			
		||||
 | 
			
		||||
		<modExtensions>
 | 
			
		||||
				<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
					<backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
					<backgroundPathXenogenes>Genes/Icons/RJW_Genes_Xenogene_Background</backgroundPathXenogenes>
 | 
			
		||||
				</li>
 | 
			
		||||
			</modExtensions>
 | 
			
		||||
	</GeneDef>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  <GeneDef ParentName="BreedingBase">
 | 
			
		||||
    <defName>rjw_genes_mechbreeder</defName>
 | 
			
		||||
    <label>Mechbreeder</label>
 | 
			
		||||
    <description>Pawns with this gene are able to birth mechanoids unharmed.</description>
 | 
			
		||||
    <iconPath>World/WorldObjects/Expanding/Mechanoids</iconPath>
 | 
			
		||||
    <displayOrderInCategory>51</displayOrderInCategory>
 | 
			
		||||
	  <displayCategory>rjw_genes_breeding</displayCategory>
 | 
			
		||||
    <biostatCpx>1</biostatCpx>
 | 
			
		||||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
 | 
			
		||||
    <modExtensions>
 | 
			
		||||
			<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
				<backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
				<backgroundPathXenogenes>Genes/Icons/RJW_Genes_Xenogene_Background</backgroundPathXenogenes>
 | 
			
		||||
			</li>
 | 
			
		||||
		</modExtensions>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
  
 | 
			
		||||
  <GeneDef>
 | 
			
		||||
  <GeneDef ParentName="BreedingBase">
 | 
			
		||||
      <defName>rjw_genes_zoophile</defName>
 | 
			
		||||
      <label>Zoophile</label>
 | 
			
		||||
      <displayCategory>rjw_genes_breeding</displayCategory>
 | 
			
		||||
      <description>Xenotypes with this Gene are Zoophile.</description>
 | 
			
		||||
      <iconPath>Genes/Icons/Zoophile</iconPath>
 | 
			
		||||
      <displayOrderInCategory>54</displayOrderInCategory>    
 | 
			
		||||
| 
						 | 
				
			
			@ -32,22 +35,46 @@
 | 
			
		|||
              <def>Zoophile</def>
 | 
			
		||||
          </li>
 | 
			
		||||
      </forcedTraits>
 | 
			
		||||
 | 
			
		||||
    <modExtensions>
 | 
			
		||||
			<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
				<backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
				<backgroundPathXenogenes>Genes/Icons/RJW_Genes_Xenogene_Background</backgroundPathXenogenes>
 | 
			
		||||
			</li>
 | 
			
		||||
		</modExtensions>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
  
 | 
			
		||||
  <GeneDef>
 | 
			
		||||
  <GeneDef ParentName="BreedingBase">
 | 
			
		||||
      <defName>rjw_genes_fertile_anus</defName>
 | 
			
		||||
      <label>Fertile Anus</label>
 | 
			
		||||
      <displayCategory>rjw_genes_breeding</displayCategory>
 | 
			
		||||
      <description>Xenotypes with this gene have a functional uterus connected to the anal cavity even for males</description>
 | 
			
		||||
      <iconPath>Genes/Icons/Fertile_anus</iconPath>
 | 
			
		||||
      <displayOrderInCategory>54</displayOrderInCategory>    
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
 | 
			
		||||
  <GeneDef ParentName="BreedingBase">
 | 
			
		||||
    <defName>rjw_genes_insectincubator</defName>
 | 
			
		||||
    <label>Insect Incubator</label>	
 | 
			
		||||
	  <geneClass>RJW_Genes.Gene_InsectIncubator</geneClass>
 | 
			
		||||
    <description>Pawns with this gene fertilize insect eggs that are placed inside them.</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Egg</iconPath>
 | 
			
		||||
    <displayOrderInCategory>52</displayOrderInCategory>
 | 
			
		||||
    <biostatCpx>1</biostatCpx>
 | 
			
		||||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
 | 
			
		||||
  <GeneDef ParentName="BreedingBase">
 | 
			
		||||
    <defName>rjw_genes_insectbreeder</defName>
 | 
			
		||||
    <label>Insect Breeder</label>	
 | 
			
		||||
    <description>Pawns with this gene are able to fertilize eggs with any fertile penis.</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Insect_Breeder</iconPath>
 | 
			
		||||
    <displayOrderInCategory>53</displayOrderInCategory>
 | 
			
		||||
    <biostatCpx>1</biostatCpx>
 | 
			
		||||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
 | 
			
		||||
  <GeneDef ParentName="BreedingBase">
 | 
			
		||||
    <defName>rjw_genes_fervent_ovipositor</defName>
 | 
			
		||||
    <label>Fervent Ovipositor</label>	
 | 
			
		||||
	  <geneClass>RJW_Genes.Gene_FerventOvipositor</geneClass>
 | 
			
		||||
    <description>Pawns that have a female (egg producing) ovipositor produce eggs at drastically increased speed.</description>
 | 
			
		||||
    <iconPath>Genes/Icons/Fervent_Ovipositor</iconPath>
 | 
			
		||||
    <displayOrderInCategory>55</displayOrderInCategory>
 | 
			
		||||
    <biostatCpx>1</biostatCpx>
 | 
			
		||||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
  </GeneDef>
 | 
			
		||||
 | 
			
		||||
</Defs>
 | 
			
		||||
| 
						 | 
				
			
			@ -5,7 +5,7 @@
 | 
			
		|||
      <exclusionTags>
 | 
			
		||||
          <li>CumAmount</li>
 | 
			
		||||
      </exclusionTags>  
 | 
			
		||||
        
 | 
			
		||||
      <randomChosen>false</randomChosen>
 | 
			
		||||
      <modExtensions>
 | 
			
		||||
        <li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
          <backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,7 @@
 | 
			
		|||
  <GeneDef Name="GeneExtraGenitaliaBase" Abstract="True">
 | 
			
		||||
    <displayCategory>rjw_genes_genitalia_extras</displayCategory>
 | 
			
		||||
 | 
			
		||||
	  <randomChosen>false</randomChosen>
 | 
			
		||||
    <modExtensions>
 | 
			
		||||
			<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
				<backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,7 @@
 | 
			
		|||
    <exclusionTags>
 | 
			
		||||
      <li>GenitalType</li>
 | 
			
		||||
    </exclusionTags>
 | 
			
		||||
	<randomChosen>true</randomChosen>
 | 
			
		||||
	  <randomChosen>false</randomChosen>
 | 
			
		||||
    <biostatCpx>0</biostatCpx>
 | 
			
		||||
    
 | 
			
		||||
    <modExtensions>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,6 +14,7 @@
 | 
			
		|||
            </li>
 | 
			
		||||
        </forcedTraits>
 | 
			
		||||
 | 
			
		||||
        <randomChosen>false</randomChosen>
 | 
			
		||||
        <modExtensions>
 | 
			
		||||
			<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
				<backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
| 
						 | 
				
			
			@ -36,6 +37,7 @@
 | 
			
		|||
            </li>
 | 
			
		||||
        </forcedTraits>
 | 
			
		||||
 | 
			
		||||
        <randomChosen>false</randomChosen>
 | 
			
		||||
        <modExtensions>
 | 
			
		||||
			<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
				<backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
| 
						 | 
				
			
			@ -44,6 +46,7 @@
 | 
			
		|||
		</modExtensions>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
	
 | 
			
		||||
    <!-- 
 | 
			
		||||
	<GeneDef>
 | 
			
		||||
        <defName>rjw_genes_sadist_gene</defName>
 | 
			
		||||
        <label>Sadist</label>
 | 
			
		||||
| 
						 | 
				
			
			@ -65,7 +68,8 @@
 | 
			
		|||
			</li>
 | 
			
		||||
		</modExtensions>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
	
 | 
			
		||||
	-->
 | 
			
		||||
 | 
			
		||||
	<GeneDef>
 | 
			
		||||
        <defName>rjw_genes_masochist</defName>
 | 
			
		||||
        <label>Masochist</label>
 | 
			
		||||
| 
						 | 
				
			
			@ -80,6 +84,7 @@
 | 
			
		|||
            </li>
 | 
			
		||||
        </forcedTraits>
 | 
			
		||||
 | 
			
		||||
        <randomChosen>false</randomChosen>
 | 
			
		||||
        <modExtensions>
 | 
			
		||||
			<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
				<backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
| 
						 | 
				
			
			@ -105,6 +110,7 @@
 | 
			
		|||
            <li>rjw_genes_sexual_orientation</li>
 | 
			
		||||
        </exclusionTags>
 | 
			
		||||
 | 
			
		||||
        <randomChosen>false</randomChosen>
 | 
			
		||||
        <modExtensions>
 | 
			
		||||
			<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
				<backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
| 
						 | 
				
			
			@ -130,6 +136,7 @@
 | 
			
		|||
            <li>rjw_genes_sexual_orientation</li>
 | 
			
		||||
        </exclusionTags>
 | 
			
		||||
 | 
			
		||||
        <randomChosen>false</randomChosen>
 | 
			
		||||
        <modExtensions>
 | 
			
		||||
			<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core" Class="VanillaGenesExpanded.GeneExtension">
 | 
			
		||||
				<backgroundPathEndogenes>Genes/Icons/RJW_Genes_Endogene_Background</backgroundPathEndogenes>
 | 
			
		||||
| 
						 | 
				
			
			@ -151,6 +158,7 @@
 | 
			
		|||
    <biostatMet>-1</biostatMet>
 | 
			
		||||
    <biostatCpx>2</biostatCpx>
 | 
			
		||||
    
 | 
			
		||||
    <randomChosen>false</randomChosen>
 | 
			
		||||
    <exclusionTags>
 | 
			
		||||
        <li>rjw_genes_sexual_orientation</li>
 | 
			
		||||
    </exclusionTags>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -109,4 +109,21 @@
 | 
			
		|||
        </modExtensions>
 | 
			
		||||
    </GeneDef>
 | 
			
		||||
 | 
			
		||||
    <GeneDef ParentName="SpecialBase">
 | 
			
		||||
		<defName>rjw_genes_cocoonweaver</defName>
 | 
			
		||||
		<label>Cocoon Weaver</label>
 | 
			
		||||
		<labelShortAdj>cocooner</labelShortAdj>
 | 
			
		||||
		<description>Carriers of this gene can produce a cocoon to prepare helpless (or willing) victims for breeding.</description>
 | 
			
		||||
		<iconPath>Genes/Icons/Cocoon</iconPath>
 | 
			
		||||
		<displayOrderInCategory>11</displayOrderInCategory>
 | 
			
		||||
		<abilities>
 | 
			
		||||
			<li>rjw_genes_ability_cocoonweaver</li>
 | 
			
		||||
		</abilities>
 | 
			
		||||
		<descriptionHyperlinks>
 | 
			
		||||
			<AbilityDef>rjw_genes_ability_cocoonweaver</AbilityDef>
 | 
			
		||||
		</descriptionHyperlinks>
 | 
			
		||||
		<biostatCpx>1</biostatCpx>
 | 
			
		||||
		<biostatMet>-1</biostatMet>
 | 
			
		||||
	</GeneDef>
 | 
			
		||||
 | 
			
		||||
</Defs>
 | 
			
		||||
							
								
								
									
										16
									
								
								Common/Defs/IncidentsDefs/Incidents_LifeForce.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Common/Defs/IncidentsDefs/Incidents_LifeForce.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,16 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
 | 
			
		||||
<Defs>	
 | 
			
		||||
	<IncidentDef>
 | 
			
		||||
		<defName>SuccubusDreamVisit</defName>
 | 
			
		||||
		<label>dirty dreams</label>
 | 
			
		||||
		<category>Misc</category>
 | 
			
		||||
		<targetTags>
 | 
			
		||||
			<li>Map_PlayerHome</li>
 | 
			
		||||
		</targetTags>
 | 
			
		||||
		<workerClass>RJW_Genes.IncidentWorker_SuccubusDreamVisit</workerClass>
 | 
			
		||||
		<baseChance>1.0</baseChance>
 | 
			
		||||
		<minRefireDays>10</minRefireDays>
 | 
			
		||||
		<pointsScaleable>false</pointsScaleable>
 | 
			
		||||
	</IncidentDef>
 | 
			
		||||
</Defs>
 | 
			
		||||
							
								
								
									
										87
									
								
								Common/Defs/PawnKindDefs/PawnKind_LifeForce.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								Common/Defs/PawnKindDefs/PawnKind_LifeForce.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,87 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
 | 
			
		||||
<Defs>
 | 
			
		||||
	<PawnKindDef>
 | 
			
		||||
		<defName>rjw_genes_succubus</defName>
 | 
			
		||||
		<label>succubus</label>
 | 
			
		||||
		<combatPower>50</combatPower>
 | 
			
		||||
		<race>Human</race>
 | 
			
		||||
		<xenotypeSet>
 | 
			
		||||
			<xenotypeChances>
 | 
			
		||||
				<rjw_genes_succubus>999</rjw_genes_succubus>
 | 
			
		||||
			</xenotypeChances>
 | 
			
		||||
		</xenotypeSet>
 | 
			
		||||
		<acceptArrestChanceFactor>0.5</acceptArrestChanceFactor>
 | 
			
		||||
		<useFactionXenotypes>false</useFactionXenotypes>
 | 
			
		||||
		<minGenerationAge>18</minGenerationAge>
 | 
			
		||||
		<maxGenerationAge>27</maxGenerationAge>
 | 
			
		||||
		<itemQuality>Poor</itemQuality>
 | 
			
		||||
		<backstoryCryptosleepCommonality>0.0</backstoryCryptosleepCommonality>
 | 
			
		||||
		<isFighter>false</isFighter>
 | 
			
		||||
		<gearHealthRange>
 | 
			
		||||
			<min>0.3</min>
 | 
			
		||||
			<max>0.9</max>
 | 
			
		||||
		</gearHealthRange>
 | 
			
		||||
		<apparelIgnoreSeasons>true</apparelIgnoreSeasons>
 | 
			
		||||
		<apparelTags>
 | 
			
		||||
			<li>Tribal</li>
 | 
			
		||||
		</apparelTags>
 | 
			
		||||
		<apparelMoney>
 | 
			
		||||
			<min>0</min>
 | 
			
		||||
			<max>0</max>
 | 
			
		||||
		</apparelMoney>
 | 
			
		||||
		<apparelAllowHeadgearChance>0</apparelAllowHeadgearChance>
 | 
			
		||||
		<techHediffsMoney>
 | 
			
		||||
			<min>0</min>
 | 
			
		||||
			<max>0</max>
 | 
			
		||||
		</techHediffsMoney>
 | 
			
		||||
		<techHediffsTags>
 | 
			
		||||
			<li>Poor</li>
 | 
			
		||||
		</techHediffsTags>
 | 
			
		||||
		<techHediffsChance>0.0</techHediffsChance>
 | 
			
		||||
		<initialWillRange>2~4</initialWillRange>
 | 
			
		||||
		<initialResistanceRange>28~44</initialResistanceRange>
 | 
			
		||||
	</PawnKindDef>
 | 
			
		||||
	
 | 
			
		||||
	<PawnKindDef>
 | 
			
		||||
		<defName>rjw_genes_incubus</defName>
 | 
			
		||||
		<label>succubus</label>
 | 
			
		||||
		<combatPower>50</combatPower>
 | 
			
		||||
		<race>Human</race>
 | 
			
		||||
		<xenotypeSet>
 | 
			
		||||
			<xenotypeChances>
 | 
			
		||||
				<rjw_genes_incubus>999</rjw_genes_incubus>
 | 
			
		||||
			</xenotypeChances>
 | 
			
		||||
		</xenotypeSet>
 | 
			
		||||
		<acceptArrestChanceFactor>0.5</acceptArrestChanceFactor>
 | 
			
		||||
		<useFactionXenotypes>false</useFactionXenotypes>
 | 
			
		||||
		<minGenerationAge>18</minGenerationAge>
 | 
			
		||||
		<maxGenerationAge>27</maxGenerationAge>
 | 
			
		||||
		<itemQuality>Poor</itemQuality>
 | 
			
		||||
		<backstoryCryptosleepCommonality>0.0</backstoryCryptosleepCommonality>
 | 
			
		||||
		<isFighter>false</isFighter>
 | 
			
		||||
		<gearHealthRange>
 | 
			
		||||
			<min>0.3</min>
 | 
			
		||||
			<max>0.9</max>
 | 
			
		||||
		</gearHealthRange>
 | 
			
		||||
		<apparelIgnoreSeasons>true</apparelIgnoreSeasons>
 | 
			
		||||
		<apparelTags>
 | 
			
		||||
			<li>Tribal</li>
 | 
			
		||||
		</apparelTags>
 | 
			
		||||
		<apparelMoney>
 | 
			
		||||
			<min>0</min>
 | 
			
		||||
			<max>0</max>
 | 
			
		||||
		</apparelMoney>
 | 
			
		||||
		<apparelAllowHeadgearChance>0</apparelAllowHeadgearChance>
 | 
			
		||||
		<techHediffsMoney>
 | 
			
		||||
			<min>0</min>
 | 
			
		||||
			<max>0</max>
 | 
			
		||||
		</techHediffsMoney>
 | 
			
		||||
		<techHediffsTags>
 | 
			
		||||
			<li>Poor</li>
 | 
			
		||||
		</techHediffsTags>
 | 
			
		||||
		<techHediffsChance>0.0</techHediffsChance>
 | 
			
		||||
		<initialWillRange>2~4</initialWillRange>
 | 
			
		||||
		<initialResistanceRange>28~44</initialResistanceRange>
 | 
			
		||||
	</PawnKindDef>
 | 
			
		||||
</Defs>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,32 +0,0 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Defs>
 | 
			
		||||
 | 
			
		||||
   <TraitDef>
 | 
			
		||||
    <defName>rjw_genes_sadist</defName>
 | 
			
		||||
    <commonality>0.5</commonality>
 | 
			
		||||
    <degreeDatas>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Sadist</label>
 | 
			
		||||
        <description>{PAWN_nameDef} is a sadist, enjoying blood and hurting others, may also be a little rapy.</description>
 | 
			
		||||
        <socialFightChanceFactor>2</socialFightChanceFactor>
 | 
			
		||||
        <allowedMeditationFocusTypes><li>Morbid</li></allowedMeditationFocusTypes>
 | 
			
		||||
		<statOffsets>
 | 
			
		||||
			<SexFrequency>0.1</SexFrequency>
 | 
			
		||||
		</statOffsets>
 | 
			
		||||
		<randomMentalState>RandomRape</randomMentalState>
 | 
			
		||||
		<randomMentalStateMtbDaysMoodCurve>
 | 
			
		||||
			<points>
 | 
			
		||||
				<li>(0, 15)</li>
 | 
			
		||||
				<li>(50, 50)</li>
 | 
			
		||||
				<li>(100, 100)</li>
 | 
			
		||||
			</points>
 | 
			
		||||
		</randomMentalStateMtbDaysMoodCurve>
 | 
			
		||||
      </li>
 | 
			
		||||
    </degreeDatas>
 | 
			
		||||
    <requiredWorkTags>
 | 
			
		||||
      <li>Violent</li>
 | 
			
		||||
    </requiredWorkTags>
 | 
			
		||||
  </TraitDef>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
</Defs>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,9 +0,0 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
 | 
			
		||||
<LanguageData>
 | 
			
		||||
 | 
			
		||||
  <StatsReport_QueenCloseBy>queen in proximity</StatsReport_QueenCloseBy>
 | 
			
		||||
  <StatsReport_QueenAbsent>queen absent</StatsReport_QueenAbsent>
 | 
			
		||||
  <StatsReport_MultipleQueens>multiple queens present</StatsReport_MultipleQueens>
 | 
			
		||||
 | 
			
		||||
</LanguageData>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,7 +0,0 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LanguageData>
 | 
			
		||||
 | 
			
		||||
    <rjw_genes_queenbirth_letter_label>New Queen</rjw_genes_queenbirth_letter_label>
 | 
			
		||||
    <rjw_genes_queenbirth_letter_description>A new Queen was born! Make sure to adress inheritance before the new queen reaches adolesence.</rjw_genes_queenbirth_letter_description>
 | 
			
		||||
 | 
			
		||||
</LanguageData>
 | 
			
		||||
							
								
								
									
										36
									
								
								Common/Patches/ThingDefs/RJW_Used_Condoms.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								Common/Patches/ThingDefs/RJW_Used_Condoms.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
	<!-- 
 | 
			
		||||
		DevNote:
 | 
			
		||||
		There used to be an issue with a Gene-Mod Called "Cum-Addiction Gene". That mod just overwrote the complete UsedCondom.xml and Sexperience Cum.xml
 | 
			
		||||
		This would lead to two types of failures: 
 | 
			
		||||
		A) If this mod was before the other mod, changes were just overwritten
 | 
			
		||||
		B) If this mod was after, there was an issue in targetting the XML throwing a patch error
 | 
			
		||||
		Please if you write mods, do not just purge out XMLs. Thanks. 
 | 
			
		||||
 | 
			
		||||
		This patch was kindly provided by Infi over Discord. 
 | 
			
		||||
	-->
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationConditional">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="UsedCondom"]/ingestible/outcomeDoers</xpath>
 | 
			
		||||
		<nomatch Class="PatchOperationAdd">
 | 
			
		||||
			<xpath>/Defs/ThingDef[defName="UsedCondom"]/ingestible</xpath>
 | 
			
		||||
			<value>
 | 
			
		||||
				<outcomeDoers>
 | 
			
		||||
					<li Class="RJW_Genes.IngestionOutcomeDoer_LifeForceOffset">
 | 
			
		||||
						<FertilinPerUnit>1</FertilinPerUnit>
 | 
			
		||||
					</li>
 | 
			
		||||
				</outcomeDoers>
 | 
			
		||||
			</value>
 | 
			
		||||
		</nomatch>
 | 
			
		||||
		<match Class="PatchOperationAdd">
 | 
			
		||||
			<xpath>Defs/ThingDef[defName="UsedCondom"]/ingestible/outcomeDoers</xpath>
 | 
			
		||||
			<value>
 | 
			
		||||
				<li Class="RJW_Genes.IngestionOutcomeDoer_LifeForceOffset">
 | 
			
		||||
						<FertilinPerUnit>1</FertilinPerUnit>
 | 
			
		||||
					</li>
 | 
			
		||||
			</value>
 | 
			
		||||
		</match>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
</Patch>
 | 
			
		||||
							
								
								
									
										42
									
								
								Common/Patches/ThingDefs/Sexperience_Cum.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								Common/Patches/ThingDefs/Sexperience_Cum.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,42 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<Patch>
 | 
			
		||||
 | 
			
		||||
	<!-- 
 | 
			
		||||
		DevNote:
 | 
			
		||||
		There used to be an issue with a Gene-Mod Called "Cum-Addiction Gene". That mod just overwrote the
 | 
			
		||||
	complete UsedCondom.xml and Sexperience Cum.xml
 | 
			
		||||
		This would lead to two types of failures: 
 | 
			
		||||
		A) If this mod was before the other mod, changes were just overwritten
 | 
			
		||||
		B) If this mod was after, there was an issue in targetting the XML throwing a patch error
 | 
			
		||||
		Please if you write mods, do not just purge out XMLs. Thanks. 
 | 
			
		||||
 | 
			
		||||
		This patch was kindly mirrored after Infis Patch of UsedCondoms. 
 | 
			
		||||
	-->
 | 
			
		||||
	<Operation Class="PatchOperationFindMod">
 | 
			
		||||
		<mods>
 | 
			
		||||
			<li>RJW Sexperience</li>
 | 
			
		||||
		</mods>
 | 
			
		||||
		<match Class="PatchOperationConditional">
 | 
			
		||||
			<xpath>Defs/ThingDef[defName="GatheredCum"]/ingestible/outcomeDoers</xpath>
 | 
			
		||||
			<nomatch Class="PatchOperationAdd">
 | 
			
		||||
				<xpath>/Defs/ThingDef[defName="GatheredCum"]/ingestible</xpath>
 | 
			
		||||
				<value>
 | 
			
		||||
					<outcomeDoers>
 | 
			
		||||
						<li Class="RJW_Genes.IngestionOutcomeDoer_LifeForceOffset">
 | 
			
		||||
							<FertilinPerUnit>1</FertilinPerUnit>
 | 
			
		||||
						</li>
 | 
			
		||||
					</outcomeDoers>
 | 
			
		||||
				</value>
 | 
			
		||||
			</nomatch>
 | 
			
		||||
			<match Class="PatchOperationAdd">
 | 
			
		||||
				<xpath>Defs/ThingDef[defName="GatheredCum"]/ingestible/outcomeDoers</xpath>
 | 
			
		||||
				<value>
 | 
			
		||||
					<li Class="RJW_Genes.IngestionOutcomeDoer_LifeForceOffset">
 | 
			
		||||
						<FertilinPerUnit>1</FertilinPerUnit>
 | 
			
		||||
					</li>
 | 
			
		||||
				</value>
 | 
			
		||||
			</match>
 | 
			
		||||
		</match>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
</Patch>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
	<!-- Copied from Vanilla BingingDrug. live selfish till rape someone. In the future add others ways to obtain lifeforce. -->
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThinkTreeDef[defName="MentalStateCritical"]/thinkRoot[@Class="ThinkNode_Tagger"]/subNodes</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<li Class="ThinkNode_ConditionalMentalState">
 | 
			
		||||
				<state>rjw_genes_lifeforce_randomrape</state>
 | 
			
		||||
				<subNodes>
 | 
			
		||||
					<li Class="ThinkNode_ConditionalNeedPercentageAbove">
 | 
			
		||||
						<need>Rest</need>
 | 
			
		||||
						<threshold>0.05</threshold>
 | 
			
		||||
						<invert>true</invert>
 | 
			
		||||
						<subNodes>
 | 
			
		||||
							<li Class="JobGiver_GetRest"/>
 | 
			
		||||
						</subNodes>
 | 
			
		||||
					</li>
 | 
			
		||||
					<li Class="ThinkNode_PrioritySorter">
 | 
			
		||||
						<minPriority>0.5</minPriority>
 | 
			
		||||
						<subNodes>
 | 
			
		||||
							<li Class="JobGiver_GetFood"/>
 | 
			
		||||
							<li Class="ThinkNode_Priority_GetJoy">
 | 
			
		||||
								<subNodes>
 | 
			
		||||
									<li Class="JobGiver_GetJoy"/>
 | 
			
		||||
								</subNodes>
 | 
			
		||||
							</li>
 | 
			
		||||
						</subNodes>
 | 
			
		||||
					</li>
 | 
			
		||||
					<li Class="rjw.JobGiver_RandomRape"/>
 | 
			
		||||
					<li Class="JobGiver_WanderColony" />
 | 
			
		||||
				</subNodes>
 | 
			
		||||
			</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
</Patch>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,105 +0,0 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="KnowGuestExecuted"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="KnowPrisonerDiedInnocent"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="KnowColonistDied"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="HarvestedOrgan_Bloodlust"]/requiredTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="KnowGuestOrganHarvested"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="KnowColonistOrganHarvested"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="ButcheredHumanlikeCorpse"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="KnowButcheredHumanlikeCorpse"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="ButcheredHumanlikeCorpseOpinion"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="ObservedLayingCorpse"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="ObservedLayingRottingCorpse"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="WitnessedDeathNonAlly"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="KilledHumanlikeBloodlust"]/requiredTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="DeadMansApparel"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="HumanLeatherApparelSad"]/nullifyingTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThoughtDef[defName="HumanLeatherApparelHappy"]/requiredTraits</xpath>
 | 
			
		||||
		<value>    
 | 
			
		||||
            <li>rjw_genes_sadist</li>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
</Patch>
 | 
			
		||||
							
								
								
									
										13
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -6,9 +6,10 @@ This mod adds genes related and based on RJW to Rimworld.
 | 
			
		|||
 | 
			
		||||
- Different Genitalia Types 
 | 
			
		||||
- Genitalia Size Scaling 
 | 
			
		||||
- Extra Genitalia (and a Futa Attempt)
 | 
			
		||||
- Most RJW Traits, Cumflation Immunity, Elasticity
 | 
			
		||||
- Extra Genitalia, Male Pregnancy, Futas, Femboys
 | 
			
		||||
- Most RJW Traits
 | 
			
		||||
- Cum-Amount Changes, Transfer Nutrition Boosts
 | 
			
		||||
- Sexual Vampires that need Cum, Cocks or some other sources.
 | 
			
		||||
- Mech Breeding Additions & Orgasmic Mytosis
 | 
			
		||||
- Human-Animal Gene Inheritance merged from [Shabakur](https://github.com/Shabakur/RJW_Animal_Gene_Inheritance)
 | 
			
		||||
- Patches for some popular / common Xenotypes from other Mods.
 | 
			
		||||
| 
						 | 
				
			
			@ -20,3 +21,11 @@ This mod adds genes related and based on RJW to Rimworld.
 | 
			
		|||
4. Alpha Genes "Female / Male Only" Genes might overwrite later Genitalia-Changes and should be avoided in combination with RJW-Genes features.
 | 
			
		||||
5. rjw.sexperience.cumgenes removes fertilin-gain from Cum item - I hope I addressed this by adding a load order but keep me posted (Issue #41)
 | 
			
		||||
6. [Consistent Gene Inheritance](https://steamcommunity.com/sharedfiles/filedetails/?id=2881479142&searchtext=Consistent+Gene+Inheritance) alters inheritance - it messes a bit with the Insect-Caste Logic. Your game will not crash, but the insect xenotypes will be a bit messed up. 
 | 
			
		||||
 | 
			
		||||
## Structure
 | 
			
		||||
 | 
			
		||||
- Toplevel: By Function (i.E. "Genes", "Animal Inheritance", "Utility")
 | 
			
		||||
- Then: By Domain, following the Gene-Categories ("Cosmetic","Special", "Damage",...)
 | 
			
		||||
- Last: By Type of Action (Def, Patch, etc.)
 | 
			
		||||
 | 
			
		||||
So if you want to change / add a gene about shrinking cocks you were to go: `Genes -> GenitaliaSize -> Defs`. 
 | 
			
		||||
							
								
								
									
										32
									
								
								Source/Common/Helpers/MapUtility.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								Source/Common/Helpers/MapUtility.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class MapUtility
 | 
			
		||||
    {
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Checks if the pawn is on the players home map. 
 | 
			
		||||
        /// 
 | 
			
		||||
        /// Reason is that drones should only be punished for absence of queen if they are on the map and there is no queen.
 | 
			
		||||
        /// If they are on a mission, transport-pod etc. they should not get boni or mali. 
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="pawn">The pawn for which to check map-presence.</param>
 | 
			
		||||
        /// <returns>True if the pawn is on the home-map, False otherwise.</returns>
 | 
			
		||||
        public static bool PawnIsOnHomeMap(Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            if (Find.Maps.NullOrEmpty() || !Find.Maps.Where(mapCandidate => mapCandidate.IsPlayerHome).Any())
 | 
			
		||||
            {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            Map homeMap = Find.Maps.Where(mapCandidate => mapCandidate.IsPlayerHome).First();
 | 
			
		||||
            return
 | 
			
		||||
                homeMap != null && pawn != null
 | 
			
		||||
                && pawn.Spawned
 | 
			
		||||
                && pawn.Map == homeMap;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -18,7 +18,7 @@ namespace RJW_Genes
 | 
			
		|||
        public static readonly ThoughtDef stoleSomeLovin = DefDatabase<ThoughtDef>.GetNamed("StoleSomeLovin");
 | 
			
		||||
        public static readonly ThoughtDef bloodlustStoleSomeLovin = DefDatabase<ThoughtDef>.GetNamed("BloodlustStoleSomeLovin");
 | 
			
		||||
        public static readonly TraitDef rapist = DefDatabase<TraitDef>.GetNamed("Rapist");
 | 
			
		||||
        public static readonly TraitDef sadist = DefDatabase<TraitDef>.GetNamed("rjw_genes_sadist");
 | 
			
		||||
 | 
			
		||||
        static Dictionary<string, LaborState> laborStateMap = new Dictionary<string, LaborState>();
 | 
			
		||||
        static public void would_rape_PostFix(ref bool __result, Pawn rapist)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -54,7 +54,7 @@ namespace RJW_Genes
 | 
			
		|||
        {
 | 
			
		||||
            if (RJW_Genes_Settings.regretStealingLovinThoughtDisabled) return;
 | 
			
		||||
 | 
			
		||||
            if (pawn.health.hediffSet.HasHediff(HediffDef.Named("LimbicStimulator")) && (__result == stoleSomeLovin || __result == bloodlustStoleSomeLovin) && !pawn.story.traits.HasTrait(rapist) && !pawn.story.traits.HasTrait(sadist))
 | 
			
		||||
            if (pawn.health.hediffSet.HasHediff(HediffDef.Named("LimbicStimulator")) && (__result == stoleSomeLovin || __result == bloodlustStoleSomeLovin) && !pawn.story.traits.HasTrait(rapist))
 | 
			
		||||
            {
 | 
			
		||||
                __result = regretsStealingLovin;
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										42
									
								
								Source/Genes/Breeding/Gene_FerventOvipositor.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								Source/Genes/Breeding/Gene_FerventOvipositor.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,42 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
 | 
			
		||||
using Verse;
 | 
			
		||||
using rjw;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// Manages the rjw_genes_fervent_ovipositor to grow eggs much faster.
 | 
			
		||||
    /// 
 | 
			
		||||
    /// TODO: Move the Multiplier into XML 
 | 
			
		||||
    /// TODO: This gene only works after the first egg, the first egg for two new pawns spawns at the same time (strange). 
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class Gene_FerventOvipositor : Gene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        const int MULTIPLIER = 3; // Tick 3 times as much, making a pawn with this Gene Produce Eggs 4 times as fast as the normal.
 | 
			
		||||
 | 
			
		||||
        public override void Tick()
 | 
			
		||||
        {
 | 
			
		||||
            base.Tick();
 | 
			
		||||
 | 
			
		||||
            if (pawn == null) return;
 | 
			
		||||
 | 
			
		||||
            Hediff_PartBaseNatural OvipositorF = (Hediff_PartBaseNatural)pawn.health.hediffSet.GetFirstHediffOfDef(rjw.Genital_Helper.ovipositorF);
 | 
			
		||||
 | 
			
		||||
            if (OvipositorF == null) return;
 | 
			
		||||
 | 
			
		||||
            OvipositorF.nextEggTick = Math.Max(OvipositorF.nextEggTick - MULTIPLIER, -1);
 | 
			
		||||
 | 
			
		||||
            // DevNote: I first had a for-loop calling OviPositorF.tick(), but I fear that would be a performance sink.
 | 
			
		||||
            // Also, it would double other aspects as well, such as bleeding out through your insect-PP or dropping out the eggs.
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										67
									
								
								Source/Genes/Breeding/Gene_InsectIncubator.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								Source/Genes/Breeding/Gene_InsectIncubator.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,67 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// This Gene checks for all parasitic Insect-Eggs in a Pawn:
 | 
			
		||||
    /// 1. Is it fertilized ? => tick it down "extra".
 | 
			
		||||
    /// 2. Is it not fertilized? => fertilize it with the Incubator as parent
 | 
			
		||||
    /// 
 | 
			
		||||
    /// To save performance, this gene fires (default) every 0.5h, which also means a slight delay until fertilization happens.
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class Gene_InsectIncubator : Gene
 | 
			
		||||
    {
 | 
			
		||||
        const int TICK_INTERVAL = 60000 / 48; // 60k = 1 day, we want 0.5h which is 1/48th of 1 day. 
 | 
			
		||||
 | 
			
		||||
        public override void Tick()
 | 
			
		||||
        {
 | 
			
		||||
            base.Tick();
 | 
			
		||||
 | 
			
		||||
            // Don't check too often, only in the HashTickInterval to safe some computing power
 | 
			
		||||
            if (this.pawn.IsHashIntervalTick(TICK_INTERVAL) && this.pawn.Map != null)
 | 
			
		||||
            {
 | 
			
		||||
                List<Hediff_InsectEgg> eggs = new List<Hediff_InsectEgg>();
 | 
			
		||||
                pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>(ref eggs);
 | 
			
		||||
                // This part works as intended and shows Non-Human Eggs too
 | 
			
		||||
                //if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"Gene_InsectIncubator: Found {eggs.Count} Hediff_InsectEgg in {pawn}");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                foreach (Hediff_InsectEgg egg in eggs)
 | 
			
		||||
                {
 | 
			
		||||
                    // The implanter check checks if the egg is still in an ovipositor. 
 | 
			
		||||
                    if (egg.implanter == null || egg.implanter == pawn)
 | 
			
		||||
                        continue;
 | 
			
		||||
 | 
			
		||||
                    if (!egg.fertilized && egg.implanter != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        egg.Fertilize(pawn);
 | 
			
		||||
                        // DevNote Issue 38: Sometimes Eggs are not fertilized here, because the normal Fertilize Function is called which has an upper Limit on Gestation.
 | 
			
		||||
                        // I will not do anything about it here, maybe upstream, but I print here. 
 | 
			
		||||
                        if (RJW_Genes_Settings.rjw_genes_detailed_debug)
 | 
			
		||||
                        {
 | 
			
		||||
                            if (egg.fertilized)
 | 
			
		||||
                                ModLog.Message($"Gene_InsectIncubator: fertilized egg {egg} in {pawn}");
 | 
			
		||||
                            else if (egg.GestationProgress > 0.5)
 | 
			
		||||
                                ModLog.Message($"Gene_InsectIncubator: Failed to fertilize {egg} in {pawn} due to high gestation progress");
 | 
			
		||||
                            else
 | 
			
		||||
                                ModLog.Message($"Gene_InsectIncubator: failed to fertiliz egg {egg} in {pawn}");
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    // DevNote: There is an issue with Eggs reaching too much gestation progress (>100%), which causes DownStream bugs. To avoid this, there are some extra checks in place.  
 | 
			
		||||
                    else if (egg.fertilized && egg.GestationProgress <= .93)
 | 
			
		||||
                    {
 | 
			
		||||
                        egg.lastTick += TICK_INTERVAL;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -29,6 +29,17 @@ namespace RJW_Genes
 | 
			
		|||
            // I could have done some transpiler stuff, but that is scary and might need to be adjusted quite a lot 
 | 
			
		||||
            // Hence, I simply re-book the nutrition back to the giver in the Postfix. That should be robust and easy. 
 | 
			
		||||
 | 
			
		||||
            /*
 | 
			
		||||
            TODO: Move this back in, once Licentia is 1.5 compatible. It should not drastically change. 
 | 
			
		||||
            if (GeneUtility.IsGenerousDonor(giver))
 | 
			
		||||
            {
 | 
			
		||||
                float donatedNutrition = CumflationHelper.CalculateNutritionAmount(giver, cumAmount);
 | 
			
		||||
                // TODO: In theory, there could be something weird happening if the donor has food less than X and the "IgnoreThermodynamics" is set on. 
 | 
			
		||||
                // Then it can happen that the donor ends up with more food than he had before cumshot, but I think that is somewhat funny given that you have ignore Thermodynamics on. 
 | 
			
		||||
                Need_Food inflatorFood = giver.needs.TryGetNeed<Need_Food>();
 | 
			
		||||
                inflatorFood.CurLevel += donatedNutrition;
 | 
			
		||||
            }
 | 
			
		||||
            */
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										56
									
								
								Source/Genes/Damage/Gene_Elasticity.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								Source/Genes/Damage/Gene_Elasticity.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,56 @@
 | 
			
		|||
//using LicentiaLabs;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// TODO: Re-Introduce this once Licentia is 1.5
 | 
			
		||||
// It should be rather simple 
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// This Gene adds Licentia-Labs Elasticised Hediff to a Pawn. 
 | 
			
		||||
    /// Note: I had a HarmonyPatch first, similar to skipping cumflation, but the Stretching Logic is called quite a lot and for both pawns actually.
 | 
			
		||||
    /// Hence, I think choosing the Elasticiced Hediff was good as then everything is covered by "Licentia-Logic". 
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class Gene_Elasticity : Gene
 | 
			
		||||
    {
 | 
			
		||||
        private const int RESET_INTERVAL = 60000; // 60k should be 1 day 
 | 
			
		||||
 | 
			
		||||
        /*
 | 
			
		||||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            // Doing it like this will add the hediff with a severity of ~0.5, but it will decay.
 | 
			
		||||
            // Hence we check with the Ticks to update.
 | 
			
		||||
            this.pawn.health.AddHediff(Licentia.HediffDefs.Elasticised);
 | 
			
		||||
            ResetSeverity();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void Tick()
 | 
			
		||||
        {
 | 
			
		||||
            base.Tick();
 | 
			
		||||
            if (pawn.IsHashIntervalTick(RESET_INTERVAL))
 | 
			
		||||
                ResetSeverity();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void PostRemove()
 | 
			
		||||
        {
 | 
			
		||||
            Hediff candidate = pawn.health.hediffSet.GetFirstHediffOfDef(Licentia.HediffDefs.Elasticised);
 | 
			
		||||
            if (candidate != null)
 | 
			
		||||
            {
 | 
			
		||||
                pawn.health.RemoveHediff(candidate);
 | 
			
		||||
            }
 | 
			
		||||
            base.PostRemove();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        private void ResetSeverity(float severity = 0.7f)
 | 
			
		||||
        {
 | 
			
		||||
            Hediff candidate = pawn.health.hediffSet.GetFirstHediffOfDef(Licentia.HediffDefs.Elasticised);
 | 
			
		||||
            if (candidate != null)
 | 
			
		||||
            {
 | 
			
		||||
                candidate.Severity = severity;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        */
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,134 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Verse;
 | 
			
		||||
using Verse.AI;
 | 
			
		||||
using Verse.AI.Group;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class IncidentWorker_SuccubusDreamVisit : IncidentWorker
 | 
			
		||||
    {
 | 
			
		||||
        //This incidint will only fire if there is a pawn asleep and sexneed is lower than 0.25
 | 
			
		||||
        protected override bool CanFireNowSub(IncidentParms parms)
 | 
			
		||||
        {
 | 
			
		||||
            if (!base.CanFireNowSub(parms))
 | 
			
		||||
            {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            Map map = (Map)parms.target;
 | 
			
		||||
            if (!map.mapTemperature.SeasonAcceptableFor(ThingDefOf.Human))
 | 
			
		||||
            {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            if (!RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi && !RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi)
 | 
			
		||||
            {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            foreach (Pawn pawn in map.mapPawns.FreeColonistsAndPrisonersSpawned)
 | 
			
		||||
            {
 | 
			
		||||
                if (pawn.jobs.curDriver.asleep && xxx.need_some_sex(pawn) > 1f)
 | 
			
		||||
                {
 | 
			
		||||
                    return true;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override bool TryExecuteWorker(IncidentParms parms)
 | 
			
		||||
        {
 | 
			
		||||
            Map map = (Map)parms.target;
 | 
			
		||||
            List<Pawn> victims = ValidVictims(map).ToList();
 | 
			
		||||
            if (victims.NullOrEmpty())
 | 
			
		||||
            {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            Faction faction;
 | 
			
		||||
            if (!this.TryFindFormerFaction(out faction))
 | 
			
		||||
            {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            int pawn_amount = RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups ? Rand.Range(1, victims.Count) : 1;
 | 
			
		||||
            List<Pawn> new_sexdemons = new List<Pawn>();
 | 
			
		||||
            for (int i = 0; i < pawn_amount; i++)
 | 
			
		||||
            {
 | 
			
		||||
                Pawn victim = victims.RandomElement();
 | 
			
		||||
                IntVec3 loc = victim.Position;
 | 
			
		||||
 | 
			
		||||
                PawnKindDef pawnKindDef;
 | 
			
		||||
                Gender gender;
 | 
			
		||||
                if (victim.gender == Gender.Male || !RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi)
 | 
			
		||||
                {
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
                if ((Rand.Bool && RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi) || !RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi)
 | 
			
		||||
                {
 | 
			
		||||
                    pawnKindDef = PawnKindDef.Named("rjw_genes_succubus");
 | 
			
		||||
                    gender = Gender.Female;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    pawnKindDef = PawnKindDef.Named("rjw_genes_incubus");
 | 
			
		||||
                    gender = Gender.Male;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                //Spawn succubus at pawn
 | 
			
		||||
                Pawn sexdemon = PawnGenerator.GeneratePawn(new PawnGenerationRequest(pawnKindDef, faction, PawnGenerationContext.NonPlayer, -1,
 | 
			
		||||
                    false, false, false, true, false, 1f, false, true, false, true, true, false, false, false, false, 0f, 0f, null, 1f, null, null,
 | 
			
		||||
                    null, null, null, null, null, gender, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f,
 | 
			
		||||
                    DevelopmentalStage.Adult, null, null, null, false));
 | 
			
		||||
                sexdemon.SetFaction(null, null);
 | 
			
		||||
                GenSpawn.Spawn(sexdemon, loc, map, WipeMode.Vanish);
 | 
			
		||||
                List<Pawn> sexdemons = new List<Pawn> { sexdemon };
 | 
			
		||||
                new_sexdemons.Add(sexdemon);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                LordMaker.MakeNewLord(Faction.OfPlayer, this.CreateLordJob(parms, sexdemon, victim), map, sexdemons);
 | 
			
		||||
 | 
			
		||||
                //Make succubus rape victim.
 | 
			
		||||
                if (RJWSettings.rape_enabled)
 | 
			
		||||
                {
 | 
			
		||||
                    //follow rjw rules
 | 
			
		||||
                    if (SexAppraiser.would_fuck(sexdemon, victim) > 0f)
 | 
			
		||||
                    {
 | 
			
		||||
                        sexdemon.pather.StopDead();
 | 
			
		||||
                        sexdemon.jobs.StopAll();
 | 
			
		||||
                        Job newJob = JobMaker.MakeJob(xxx.RapeRandom, victim);
 | 
			
		||||
                        sexdemon.jobs.StartJob(newJob, JobCondition.InterruptForced, null, false, true, null, null, false, false, null, false, true);
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            Find.LetterStack.ReceiveLetter("rjw_genes_sexdemon_visit_incident_label".Translate(), "rjw_genes_sexdemon_visit_incident_description".Translate(), RimWorld.LetterDefOf.PositiveEvent, new_sexdemons, null, null, null, null);
 | 
			
		||||
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private IEnumerable<Pawn> ValidVictims(Map map)
 | 
			
		||||
        {
 | 
			
		||||
            foreach (Pawn pawn in map.mapPawns.FreeColonistsAndPrisonersSpawned)
 | 
			
		||||
            {
 | 
			
		||||
                if (pawn.jobs.curDriver.asleep && xxx.need_some_sex(pawn) > 1f)
 | 
			
		||||
                {
 | 
			
		||||
                    yield return pawn;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            yield break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private bool TryFindFormerFaction(out Faction formerFaction)
 | 
			
		||||
        {
 | 
			
		||||
            return Find.FactionManager.TryGetRandomNonColonyHumanlikeFaction(out formerFaction, false, true, TechLevel.Undefined, false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected virtual LordJob_SuccubusVisit CreateLordJob(IncidentParms parms, Pawn succubus, Pawn target)
 | 
			
		||||
        {
 | 
			
		||||
            return new LordJob_SuccubusVisit(target);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,102 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Verse;
 | 
			
		||||
using Verse.AI.Group;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    //Based on LordJob_VisitColony
 | 
			
		||||
    public class LordJob_SuccubusVisit : LordJob
 | 
			
		||||
    {
 | 
			
		||||
        public LordJob_SuccubusVisit() { }
 | 
			
		||||
        public LordJob_SuccubusVisit(Pawn target)
 | 
			
		||||
        {
 | 
			
		||||
            this.target = target;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //
 | 
			
		||||
        //Stategraph has lordtoils which say what a pawn should be doing
 | 
			
		||||
        //Transitions say when active lordtoil for pawn should change
 | 
			
		||||
        //
 | 
			
		||||
        public override StateGraph CreateGraph()
 | 
			
		||||
        {
 | 
			
		||||
            StateGraph stateGraph = new StateGraph();
 | 
			
		||||
 | 
			
		||||
            //Flirt
 | 
			
		||||
            LordToil_Flirt lordToil_Flirt = new LordToil_Flirt(this.target, 7f);
 | 
			
		||||
            stateGraph.AddToil(lordToil_Flirt);
 | 
			
		||||
            stateGraph.StartingToil = lordToil_Flirt;
 | 
			
		||||
 | 
			
		||||
            //Leave
 | 
			
		||||
            LordToil_ExitMapRandom lordToil_ExitMapRandom = new LordToil_ExitMapRandom();
 | 
			
		||||
            stateGraph.AddToil(lordToil_ExitMapRandom);
 | 
			
		||||
            LordToil_ExitMapAndDefendSelf lordToil_ExitMapAndDefendSelf = new LordToil_ExitMapAndDefendSelf();
 | 
			
		||||
            stateGraph.AddToil(lordToil_ExitMapAndDefendSelf);
 | 
			
		||||
 | 
			
		||||
            //Leave after some time
 | 
			
		||||
            Transition transition1 = new Transition(lordToil_Flirt, lordToil_ExitMapRandom, false, true);
 | 
			
		||||
            int tickLimit;
 | 
			
		||||
            if (this.durationTicks != null)
 | 
			
		||||
            {
 | 
			
		||||
                tickLimit = this.durationTicks.Value;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                tickLimit = Rand.Range(60000, 180000); //~1-3 days
 | 
			
		||||
            }
 | 
			
		||||
            transition1.AddTrigger(new Trigger_TicksPassed(tickLimit));
 | 
			
		||||
            transition1.AddPreAction(new TransitionAction_Custom(new Action(this.SuccubiLeave))); //Join or leave colony
 | 
			
		||||
            stateGraph.AddTransition(transition1);
 | 
			
		||||
 | 
			
		||||
            //If they become hostile
 | 
			
		||||
            Transition transition3 = new Transition(lordToil_Flirt, lordToil_ExitMapAndDefendSelf, false, true);
 | 
			
		||||
            transition3.AddSource(lordToil_ExitMapRandom); //Not sure what this does 
 | 
			
		||||
            transition3.AddTrigger(new Trigger_BecamePlayerEnemy());
 | 
			
		||||
            transition3.AddTrigger(new Trigger_PawnKilled());
 | 
			
		||||
            transition3.AddPostAction(new TransitionAction_EndAllJobs());
 | 
			
		||||
            stateGraph.AddTransition(transition3, false);
 | 
			
		||||
 | 
			
		||||
            Transition transition4 = new Transition(lordToil_ExitMapRandom, lordToil_ExitMapAndDefendSelf, false, true);
 | 
			
		||||
            transition4.AddSource(lordToil_Flirt); //Not sure what this does 
 | 
			
		||||
            transition4.AddTrigger(new Trigger_PawnHarmed(1f, true, Faction.OfPlayer));
 | 
			
		||||
            stateGraph.AddTransition(transition4, false);
 | 
			
		||||
 | 
			
		||||
            return stateGraph;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //add toggleable gizmo to allow playes to have colonists sex the succubus into joining your colony
 | 
			
		||||
        //comfort pawn? cooldown?
 | 
			
		||||
        public override IEnumerable<Gizmo> GetPawnGizmos(Pawn p)
 | 
			
		||||
        {
 | 
			
		||||
            return base.GetPawnGizmos(p);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void ExposeData()
 | 
			
		||||
        {
 | 
			
		||||
            Scribe_Values.Look<int?>(ref this.durationTicks, "durationTicks", null, false);
 | 
			
		||||
            Scribe_References.Look<Pawn>(ref this.target, "target", false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SuccubiLeave()
 | 
			
		||||
        {
 | 
			
		||||
            foreach (Pawn pawn in this.lord.ownedPawns)
 | 
			
		||||
            {
 | 
			
		||||
                if (colonyJoiners.Contains(pawn))
 | 
			
		||||
                {
 | 
			
		||||
                    RecruitUtility.Recruit(pawn, Faction.OfPlayer);
 | 
			
		||||
                    Find.LetterStack.ReceiveLetter("rjw_genes_succubus_joins_letter_label".Translate(), string.Format("rjw_genes_succubus_joins_letter_description".Translate(), xxx.get_pawnname(pawn)), RimWorld.LetterDefOf.PositiveEvent, pawn, null, null, null, null);
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    Messages.Message("SuccubusLeaving".Translate(xxx.get_pawnname(pawn)), pawn, MessageTypeDefOf.NeutralEvent, true);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Pawn target;
 | 
			
		||||
        private int? durationTicks;
 | 
			
		||||
        public List<Pawn> colonyJoiners = new List<Pawn>();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,51 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using rjw.Modules.Interactions;
 | 
			
		||||
using rjw.Modules.Interactions.Internals.Implementation;
 | 
			
		||||
using rjw.Modules.Interactions.Objects;
 | 
			
		||||
using rjw;
 | 
			
		||||
using rjw.Modules.Interactions.Enums;
 | 
			
		||||
 | 
			
		||||
//Modefied code based of RJW-AI code at https://gitgud.io/Ed86/rjw-ia/-/tree/master/
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    [StaticConstructorOnStartup]
 | 
			
		||||
    public class DomSuccubusTailCustomRequirementHandler : ICustomRequirementHandler
 | 
			
		||||
    {
 | 
			
		||||
        public string HandlerKey
 | 
			
		||||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                return "DomSuccubusTailCustomRequirementHandler";
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        static DomSuccubusTailCustomRequirementHandler()
 | 
			
		||||
        {
 | 
			
		||||
            Register();
 | 
			
		||||
        }
 | 
			
		||||
        public static void Register()
 | 
			
		||||
        {
 | 
			
		||||
            InteractionRequirementService.CustomRequirementHandlers.Add(new DomSuccubusTailCustomRequirementHandler());
 | 
			
		||||
            if (Prefs.DevMode)
 | 
			
		||||
            {
 | 
			
		||||
                Log.Message("DomSuccubusTailCustomRequirementHandler registered: ");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool FufillRequirements(InteractionWithExtension interaction, InteractionPawn dominant, InteractionPawn submissive)
 | 
			
		||||
        {
 | 
			
		||||
            if (GeneUtility.HasGeneNullCheck(dominant.Pawn, GeneDefOf.rjw_genes_succubus_tail))
 | 
			
		||||
            {
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,74 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using rjw;
 | 
			
		||||
using rjw.Modules.Interactions.Contexts;
 | 
			
		||||
using rjw.Modules.Interactions.Enums;
 | 
			
		||||
using rjw.Modules.Interactions.Rules.PartKindUsageRules;
 | 
			
		||||
using rjw.Modules.Shared;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes.Interactions
 | 
			
		||||
{
 | 
			
		||||
    //Summary//
 | 
			
		||||
    //Set custom preferences for pawn. Gets integrated into rjw by AddtoIPartPreferenceRule in First
 | 
			
		||||
    //Depending on the level of lifeforce increase the chance for using the mouth.
 | 
			
		||||
    public class GenesPartKindUsageRule : IPartPreferenceRule
 | 
			
		||||
    {
 | 
			
		||||
        public IEnumerable<Weighted<LewdablePartKind>> ModifiersForDominant(InteractionContext context)
 | 
			
		||||
        {
 | 
			
		||||
            Pawn pawn = context.Internals.Dominant.Pawn;
 | 
			
		||||
            Gene_LifeForce gene = pawn.genes.GetFirstGeneOfType<Gene_LifeForce>();
 | 
			
		||||
            if (gene != null)
 | 
			
		||||
            {
 | 
			
		||||
                float weight = 2f;
 | 
			
		||||
                if (gene.Value < gene.MinLevelForAlert)
 | 
			
		||||
                {
 | 
			
		||||
                    weight *= 10;
 | 
			
		||||
                }
 | 
			
		||||
                else if (gene.Value < gene.targetValue)
 | 
			
		||||
                {
 | 
			
		||||
                    weight *= 2.5f;
 | 
			
		||||
                }
 | 
			
		||||
                if (pawn.genes.HasGene(GeneDefOf.rjw_genes_cum_eater))
 | 
			
		||||
                {
 | 
			
		||||
                    yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Mouth);
 | 
			
		||||
                    yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Beak);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (pawn.genes.HasGene(GeneDefOf.rjw_genes_fertilin_absorber))
 | 
			
		||||
                {
 | 
			
		||||
                    yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Vagina);
 | 
			
		||||
                    yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Anus);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            yield break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public IEnumerable<Weighted<LewdablePartKind>> ModifiersForSubmissive(InteractionContext context)
 | 
			
		||||
        {
 | 
			
		||||
            Pawn pawn = context.Internals.Dominant.Pawn;
 | 
			
		||||
            Gene_LifeForce gene = pawn.genes.GetFirstGeneOfType<Gene_LifeForce>();
 | 
			
		||||
            if (gene != null)
 | 
			
		||||
            {
 | 
			
		||||
                float weight = 2f;
 | 
			
		||||
                if (gene.Value < gene.MinLevelForAlert)
 | 
			
		||||
                {
 | 
			
		||||
                    weight *= 10;
 | 
			
		||||
                }
 | 
			
		||||
                else if (gene.Value < gene.targetValue)
 | 
			
		||||
                {
 | 
			
		||||
                    weight *= 2.5f;
 | 
			
		||||
                }
 | 
			
		||||
                yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Mouth);
 | 
			
		||||
                yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Beak);
 | 
			
		||||
 | 
			
		||||
                if (pawn.genes.HasGene(GeneDefOf.rjw_genes_fertilin_absorber))
 | 
			
		||||
                {
 | 
			
		||||
                    yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Vagina);
 | 
			
		||||
                    yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Anus);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            yield break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
using Verse;
 | 
			
		||||
using rjw.Modules.Interactions;
 | 
			
		||||
using rjw.Modules.Interactions.Internals.Implementation;
 | 
			
		||||
using rjw.Modules.Interactions.Objects;
 | 
			
		||||
 | 
			
		||||
//Modified code based of RJW-AI code at https://gitgud.io/Ed86/rjw-ia/-/tree/master/
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    [StaticConstructorOnStartup]
 | 
			
		||||
    public class SubSuccubusTailCustomRequirementHandler : ICustomRequirementHandler
 | 
			
		||||
    {
 | 
			
		||||
        public string HandlerKey
 | 
			
		||||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                return "SubSuccubusTailCustomRequirementHandler";
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        static SubSuccubusTailCustomRequirementHandler()
 | 
			
		||||
        {
 | 
			
		||||
            Register();
 | 
			
		||||
        }
 | 
			
		||||
        public static void Register()
 | 
			
		||||
        {
 | 
			
		||||
            InteractionRequirementService.CustomRequirementHandlers.Add(new SubSuccubusTailCustomRequirementHandler());
 | 
			
		||||
            if (Prefs.DevMode)
 | 
			
		||||
            {
 | 
			
		||||
                Log.Message("SubSuccubusTailCustomRequirementHandler registered: ");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool FufillRequirements(InteractionWithExtension interaction, InteractionPawn dominant, InteractionPawn submissive)
 | 
			
		||||
        {
 | 
			
		||||
            if (GeneUtility.HasGeneNullCheck(submissive.Pawn, GeneDefOf.rjw_genes_succubus_tail))
 | 
			
		||||
            {
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -25,6 +25,12 @@ namespace RJW_Genes
 | 
			
		|||
			{
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			// Exit if the pawn has ONLY an archotech penis, and no other penises. Issue #72
 | 
			
		||||
			if (props.pawn.health.hediffSet.hediffs.Any(x => x.def == rjw.Genital_Helper.archotech_penis) 
 | 
			
		||||
				&& !(Genital_Helper.has_multipenis(props.pawn)))
 | 
			
		||||
			{
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			//Summary//
 | 
			
		||||
			//We use the positions of the pawn (dom or sub) and based on that which interactions will transfer fertilin 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,81 @@
 | 
			
		|||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// The CocoonWeaver Ability applies the RJW-Cocoon to a pawn.
 | 
			
		||||
    /// Friendly Pawns can always be cocooned, neutral and hostile pawns must be downed. 
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class CompAbilityEffect_CocoonWeaver : CompAbilityEffect
 | 
			
		||||
    {
 | 
			
		||||
        private new CompProperties_AbilityCocoonWeaver Props
 | 
			
		||||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                return (CompProperties_AbilityCocoonWeaver)this.props;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
 | 
			
		||||
        {
 | 
			
		||||
            base.Apply(target, dest);
 | 
			
		||||
 | 
			
		||||
            Pawn CocooningPawn = this.parent.pawn;
 | 
			
		||||
            Pawn PawnToCocoon = target.Pawn;
 | 
			
		||||
 | 
			
		||||
            // Error Case - Null Pawn
 | 
			
		||||
            if (PawnToCocoon == null)
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            PawnToCocoon.health.AddHediff(HediffDef.Named("RJW_Cocoon"));
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// For validity, there are a few checks:
 | 
			
		||||
        /// 0. Target is not already cocooned 
 | 
			
		||||
        /// 1. Target is either Colonist / Prisoner 
 | 
			
		||||
        /// 2. If the Target is an enemy or neutral, it must be downed. 
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
 | 
			
		||||
        {
 | 
			
		||||
            Pawn cocoonTarget = target.Pawn;
 | 
			
		||||
            if (cocoonTarget != null)
 | 
			
		||||
            {
 | 
			
		||||
                bool CocoonTargetIsColonistOrPrisoner = cocoonTarget.Faction == this.parent.pawn.Faction || cocoonTarget.IsPrisonerOfColony;
 | 
			
		||||
                bool CocoonTargetIsHostile = cocoonTarget.HostileTo(this.parent.pawn);
 | 
			
		||||
                bool CocoonTargetIsDowned = cocoonTarget.Downed;
 | 
			
		||||
 | 
			
		||||
                if (cocoonTarget.health.hediffSet.hediffs.Any(t => t.def.defName == "RJW_Cocoon"))
 | 
			
		||||
                {
 | 
			
		||||
                    if (throwMessages)
 | 
			
		||||
                        Messages.Message(cocoonTarget.Name + " is already cocooned.", cocoonTarget, MessageTypeDefOf.RejectInput, false);
 | 
			
		||||
                    return false;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (!CocoonTargetIsColonistOrPrisoner && !(CocoonTargetIsHostile && CocoonTargetIsDowned))
 | 
			
		||||
                {
 | 
			
		||||
                    if (throwMessages)
 | 
			
		||||
                    {
 | 
			
		||||
                        if (CocoonTargetIsHostile && !CocoonTargetIsDowned)
 | 
			
		||||
                        {
 | 
			
		||||
                            Messages.Message(cocoonTarget.Name + " is hostile, but not downed.", cocoonTarget, MessageTypeDefOf.RejectInput, false);
 | 
			
		||||
                        }
 | 
			
		||||
                        else if (!CocoonTargetIsColonistOrPrisoner)
 | 
			
		||||
                        {
 | 
			
		||||
                            Messages.Message(cocoonTarget.Name + " is not a part of the colony or hostile.", cocoonTarget, MessageTypeDefOf.RejectInput, false);
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    return false;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return base.Valid(target, throwMessages);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
    public class CompProperties_AbilityCocoonWeaver : CompProperties_AbilityEffect
 | 
			
		||||
    {
 | 
			
		||||
        public CompProperties_AbilityCocoonWeaver()
 | 
			
		||||
        {
 | 
			
		||||
            this.compClass = typeof(CompAbilityEffect_CocoonWeaver);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -33,15 +33,15 @@ namespace RJW_Genes
 | 
			
		|||
            if (!other.RaceProps.Humanlike)
 | 
			
		||||
                return (ThoughtState)false;
 | 
			
		||||
 | 
			
		||||
            // Pawns that have not "met" wont give each other Mali
 | 
			
		||||
            // Known-Each-Other is a key-word for Rimworld that shows they have had any interaction and stored each other in relations. 
 | 
			
		||||
            if (!RelationsUtility.PawnsKnowEachOther(pawn, other))
 | 
			
		||||
                return (ThoughtState)false;
 | 
			
		||||
            // If the pawn is not on Map (e.g. caravan), no mali 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            if (!MapUtility.PawnIsOnHomeMap(pawn))
 | 
			
		||||
                return (ThoughtState)false;
 | 
			
		||||
            // Do nothing for pawns that also have pheromones
 | 
			
		||||
            if (GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_aphrodisiac_pheromones))
 | 
			
		||||
 | 
			
		||||
                return (ThoughtState)false;
 | 
			
		||||
 | 
			
		||||
            // Actual Logic: 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,24 @@
 | 
			
		|||
    <None Include="..\Common\Defs\Genes\GeneDefs_ExtraGenitaliaEndogenes.xml" />
 | 
			
		||||
    <None Include="..\Common\Defs\Genes\GeneDefs_GenitaliaTypeEndogenes.xml" />
 | 
			
		||||
    <None Include="..\Common\Languages\English\Keyed\Dialog_StatsReport.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\**" />
 | 
			
		||||
    <None Include="..\Common\Patches\Genes\Patch_Highmates.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Genes\Patch_Unbreakable.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\GenitaliaUpdate.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchAlphaGenes.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchBiotechNyaron.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchErinsAuronya.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchErinsShisune.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchKijinRace3.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchNarai.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchNyaron.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchPapou.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchRoosFaun.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchRoosMinotaur.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchRoosSatyr.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchSaurid.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchVREPhytokin.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchVRESanguophage.xml" />
 | 
			
		||||
    <None Include="..\Common\Patches\Xenotypes\PatchXenotech.xml" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Compile Include="Animal_Inheritance\InheritanceUtility.cs" />
 | 
			
		||||
| 
						 | 
				
			
			@ -43,9 +60,18 @@
 | 
			
		|||
    <Compile Include="Common\Defs\ModExtensionHelper.cs" />
 | 
			
		||||
    <Compile Include="Common\Either.cs" />
 | 
			
		||||
    <Compile Include="Common\Helpers\LaborState.cs" />
 | 
			
		||||
    <Compile Include="Common\Helpers\MapUtility.cs" />
 | 
			
		||||
    <Compile Include="Common\ModLog.cs" />
 | 
			
		||||
    <Compile Include="Common\Defs\TickIntervalExtension.cs" />
 | 
			
		||||
    <Compile Include="Common\Patches\PatchImplants.cs" />
 | 
			
		||||
    <Compile Include="Genes\Breeding\Gene_FerventOvipositor.cs" />
 | 
			
		||||
    <Compile Include="Genes\Breeding\Gene_InsectIncubator.cs" />
 | 
			
		||||
    <Compile Include="Genes\Damage\Gene_Elasticity.cs" />
 | 
			
		||||
    <Compile Include="Genes\Life_Force\Events\SuccubusVisit\IncidentWorker_SuccubusVisit.cs" />
 | 
			
		||||
    <Compile Include="Genes\Life_Force\Events\SuccubusVisit\LordJob_SuccubusVisit.cs" />
 | 
			
		||||
    <Compile Include="Genes\Life_Force\Interactions\SuccubusTailjob\DomSuccubusTailCustomRequirementHandler.cs" />
 | 
			
		||||
    <Compile Include="Genes\Life_Force\Interactions\SuccubusTailjob\GenesPartKindUsageRule.cs" />
 | 
			
		||||
    <Compile Include="Genes\Life_Force\Interactions\SuccubusTailjob\SubSuccubusTailCustomRequirementHandler.cs" />
 | 
			
		||||
    <Compile Include="Genes\Patches\PatchLitteredBirth.cs" />
 | 
			
		||||
    <Compile Include="Common\Patches\PatchGetParents.cs" />
 | 
			
		||||
    <Compile Include="Common\Patches\PatchPregnancyHelper.cs" />
 | 
			
		||||
| 
						 | 
				
			
			@ -135,6 +161,8 @@
 | 
			
		|||
    <Compile Include="Genes\Patches\LustFeeding.cs" />
 | 
			
		||||
    <Compile Include="Genes\Patches\MultiplePregnancies.cs" />
 | 
			
		||||
    <Compile Include="Genes\Patch_AddNotifyOnGeneration.cs" />
 | 
			
		||||
    <Compile Include="Genes\Special\Abilities\CompAbilityEffect_CocoonWeaver.cs" />
 | 
			
		||||
    <Compile Include="Genes\Special\Abilities\CompProperties_AbilityCocoonWeaver.cs" />
 | 
			
		||||
    <Compile Include="Genes\Special\Defs\AgeTransferExtension.cs" />
 | 
			
		||||
    <Compile Include="Genes\Special\Defs\HormonalSalivaExtension.cs" />
 | 
			
		||||
    <Compile Include="Genes\Special\Patches\Patch_AgeDrain.cs" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,30 +12,46 @@ namespace RJW_Genes
 | 
			
		|||
            //Copied from RJW settings mostly
 | 
			
		||||
            Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f);
 | 
			
		||||
            Rect rect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + 300f);
 | 
			
		||||
            //Widgets.BeginScrollView(outRect, ref RJWSettings.scrollPosition, rect, true);
 | 
			
		||||
 | 
			
		||||
            Listing_Standard listing_Standard = new Listing_Standard();
 | 
			
		||||
            listing_Standard.maxOneColumn = true;
 | 
			
		||||
            listing_Standard.ColumnWidth = rect.width / 2.05f;
 | 
			
		||||
            listing_Standard.Begin(rect);
 | 
			
		||||
            listing_Standard.Gap(24f); 
 | 
			
		||||
            // Genitalia Resizing Age
 | 
			
		||||
            listing_Standard.Label("Genitalia resizing age" + ": " +
 | 
			
		||||
                Math.Round((double)(RJW_Genes_Settings.rjw_genes_resizing_age), 0).ToString() , -1f, "years.");
 | 
			
		||||
            RJW_Genes_Settings.rjw_genes_resizing_age = listing_Standard.Slider(RJW_Genes_Settings.rjw_genes_resizing_age, 18f, 100f);
 | 
			
		||||
            listing_Standard.Gap(4f);
 | 
			
		||||
            listing_Standard.Label("Fertilin-Gain from Animals" + ": " +
 | 
			
		||||
            // Evergrowth Speed 
 | 
			
		||||
            listing_Standard.Label("number of ticks between genitalia evergrowth updates (60000 ticks are 1 day)" + ": " +
 | 
			
		||||
               Math.Round((double)(RJW_Genes_Settings.rjw_genes_evergrowth_ticks), 0).ToString() , -1f, "ticks.");
 | 
			
		||||
            RJW_Genes_Settings.rjw_genes_evergrowth_ticks = (int) listing_Standard.Slider(RJW_Genes_Settings.rjw_genes_evergrowth_ticks, 600, 60000);
 | 
			
		||||
 | 
			
		||||
            listing_Standard.Gap(4f);
 | 
			
		||||
            listing_Standard.Label("nunmber of ticks between genitalia evergrowth updates (600 tick for ~2cm/day)" + ": " +
 | 
			
		||||
               Math.Round((double)(RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor * 100f), 0).ToString() + "%", -1f, "of fertilin gained (compared to human-baseline).");
 | 
			
		||||
            // Fertilin Gain From Animals
 | 
			
		||||
            listing_Standard.Label("Fertilin-Gain from Animals" + ": " +
 | 
			
		||||
               Math.Round((double)(RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor * 100f), 0).ToString() + "", -1f, "of fertilin gained (compared to human-baseline).");
 | 
			
		||||
            RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor = listing_Standard.Slider(RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, 0f, 3f);
 | 
			
		||||
 | 
			
		||||
            listing_Standard.Gap(5f);
 | 
			
		||||
            listing_Standard.CheckboxLabeled("Sexdemon Visits", ref rjw_genes_sexdemon_visit, "If enabled, incubi and succubi can spawn in through an event.", 0f, 1f);
 | 
			
		||||
            if (rjw_genes_sexdemon_visit)
 | 
			
		||||
            {
 | 
			
		||||
                listing_Standard.Gap(3f);
 | 
			
		||||
                listing_Standard.CheckboxLabeled("  Size matters", ref rjw_genes_sexdemon_join_size_matters, "Incubi and succubi will consider size/tightness of partners genital for deciding if they want to join", 0f, 1f);
 | 
			
		||||
                listing_Standard.Gap(3f);
 | 
			
		||||
                listing_Standard.CheckboxLabeled("  Sexdemon groups", ref rjw_genes_sexdemon_visit_groups, "Multiple sexdemons can spawn during a event", 0f, 1f);
 | 
			
		||||
                listing_Standard.Gap(3f);
 | 
			
		||||
                listing_Standard.CheckboxLabeled("  Succubi", ref rjw_genes_sexdemon_visit_succubi, "Allow incubi to spawn through this even", 0f, 1f);
 | 
			
		||||
                listing_Standard.Gap(3f);
 | 
			
		||||
                listing_Standard.CheckboxLabeled("  Incubi", ref rjw_genes_sexdemon_visit_incubi, "Allow incubi to spawn through this even", 0f, 1f);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            listing_Standard.Gap(4f);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            listing_Standard.Gap(4f);
 | 
			
		||||
            listing_Standard.CheckboxLabeled("RegretStealingLovinThoughtDisabled".Translate(), ref regretStealingLovinThoughtDisabled, "RegretStealingLovinThoughtDisabledDesc".Translate());
 | 
			
		||||
            listing_Standard.CheckboxLabeled("Regret Stealing Love", ref regretStealingLovinThoughtDisabled, "If off, pawns will not get bad thoughts for seduction.");
 | 
			
		||||
 | 
			
		||||
            listing_Standard.Gap(5f);
 | 
			
		||||
            listing_Standard.CheckboxLabeled("generous-donor cheatmode", ref rjw_genes_generous_donor_cheatmode, "When enabled, pawns with the 'generous donor' are not drained and not fertilin exhausted. Hence they can fuel succubi and incubi non-stop. This makes them drastically easier to keep, and you should not do it.", 0f, 1f);
 | 
			
		||||
| 
						 | 
				
			
			@ -53,7 +69,12 @@ namespace RJW_Genes
 | 
			
		|||
            Scribe_Values.Look<float>(ref RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, "rjw_genes_fertilin_from_animals_factor", RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_detailed_debug, "rjw_genes_detailed_debug", RJW_Genes_Settings.rjw_genes_detailed_debug, true);
 | 
			
		||||
            Scribe_Values.Look(ref regretStealingLovinThoughtDisabled, "regretStealingLovinThoughtDisabled", regretStealingLovinThoughtDisabled, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, "rjw_genes_generous_donor_cheatmode", RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, "rjw_genes_generous_donor_cheatmode", RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, true); 
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit, "rjw_genes_sexdemon_visit", RJW_Genes_Settings.rjw_genes_sexdemon_visit, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, "rjw_genes_sexdemon_join_size_matters", RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, "rjw_genes_sexdemon_groups", RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, "rjw_genes_sexdemon_succubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, "rjw_genes_sexdemon_incubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static bool rjw_genes_detailed_debug = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -62,6 +83,11 @@ namespace RJW_Genes
 | 
			
		|||
        public static int rjw_genes_evergrowth_ticks = 60000;
 | 
			
		||||
        public static bool regretStealingLovinThoughtDisabled = false;
 | 
			
		||||
 | 
			
		||||
        public static bool rjw_genes_sexdemon_visit = true;
 | 
			
		||||
        public static bool rjw_genes_sexdemon_join_size_matters = true;
 | 
			
		||||
        public static bool rjw_genes_sexdemon_visit_groups = true;
 | 
			
		||||
        public static bool rjw_genes_sexdemon_visit_succubi = true;
 | 
			
		||||
        public static bool rjw_genes_sexdemon_visit_incubi = true;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue