mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Compare commits
6 commits
75950b6864
...
420e14f7af
Author | SHA1 | Date | |
---|---|---|---|
|
420e14f7af | ||
|
f1debffbb3 | ||
|
b263b68538 | ||
|
9d6361454e | ||
|
1cb50f5a26 | ||
|
9ec6993b00 |
19 changed files with 420 additions and 33 deletions
|
@ -96,6 +96,7 @@ but they are meant mostly to have infectors immune against their own diseases.
|
|||
|
||||
- Fixed an Issue where pawns would always get the Pheromone social boost, unless they had the pheromone (#113)
|
||||
- Fixed two hidden dependencies on Ideology and Royalty (#115)
|
||||
- Fixed some more hidden dependencies on Ideology Icons (#118)
|
||||
|
||||
**Internal:**
|
||||
|
||||
|
@ -105,6 +106,8 @@ but they are meant mostly to have infectors immune against their own diseases.
|
|||
|
||||
**Notes:**
|
||||
|
||||
*One Time Error Load*
|
||||
|
||||
The changes to the cum-gene will give a 1-time warning on loading the save. The warning looks like this:
|
||||
```
|
||||
Could not find class RJW_Genes.Gene_MuchCum while resolving node li. Trying to use Verse.Gene instead. Full node: <li Class="RJW_Genes.Gene_MuchCum"><def>rjw_genes_much_cum</def><pawn>Thing_Human697</pawn><overriddenByGene>null</overriddenByGene><loadID>82</loadID></li>
|
||||
|
@ -115,6 +118,12 @@ Verse.Log:Error (string)
|
|||
|
||||
This is not dangerous.
|
||||
|
||||
*Supporting*
|
||||
|
||||
You can now support me with [buying me a coffee](https://buymeacoffee.com/vegapnk).
|
||||
The mod will remain free, open source and I will not hide or lock any features.
|
||||
Its just meant if you want to drop me a tip.
|
||||
|
||||
# 2.1.0 (27-06-2024)
|
||||
|
||||
**Additions**:
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
<GeneDef ParentName="BreedingBase">
|
||||
<defName>rjw_genes_fertile_anus</defName>
|
||||
<label>fertile anus</label>
|
||||
<description>Xenotypes with this gene have a functional uterus connected to the anal cavity even
|
||||
for males</description>
|
||||
<description>Xenotypes with this gene have a functional uterus if they do not possess one by means of their vagina.
|
||||
For males, it is connected to the anal cavity and leads to a normal pregnancy.</description>
|
||||
<iconPath>Genes/Icons/Fertile_anus</iconPath>
|
||||
<displayOrderInCategory>54</displayOrderInCategory>
|
||||
</GeneDef>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<displayCategory>rjw_genes_damage</displayCategory>
|
||||
<description>This Gene makes the Carrier unable to get mood or social penalties from being raped
|
||||
and they cannot be broken for a long period of time.</description>
|
||||
<iconPath>UI/Icons/Rituals/TrialDefend</iconPath>
|
||||
<iconPath>Genes/Icons/TrialDefend</iconPath>
|
||||
<displayOrderInCategory>2</displayOrderInCategory>
|
||||
<biostatMet>-1</biostatMet>
|
||||
<biostatCpx>1</biostatCpx>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
imply negative side-effects.</description>
|
||||
<biostatCpx>1</biostatCpx>
|
||||
<biostatMet>-1</biostatMet>
|
||||
<iconPath>UI/Icons/Rituals/TrialDefend</iconPath>
|
||||
<iconPath>Genes/Icons/TrialDefend</iconPath>
|
||||
<modExtensions>
|
||||
<li MayRequire="OskarPotocki.VanillaFactionsExpanded.Core"
|
||||
Class="VanillaGenesExpanded.GeneExtension">
|
||||
|
|
|
@ -52,31 +52,6 @@
|
|||
</modExtensions>
|
||||
</GeneDef>
|
||||
|
||||
<!--
|
||||
<GeneDef>
|
||||
<defName>rjw_genes_sadist_gene</defName>
|
||||
<label>sadist</label>
|
||||
<displayCategory>Reproduction</displayCategory>
|
||||
<description>Xenotypes with this Gene are Sadists.</description>
|
||||
<iconPath>Genes/Icons/Rape</iconPath>
|
||||
<biostatMet>1</biostatMet>
|
||||
<displayOrderInCategory>2</displayOrderInCategory>
|
||||
<forcedTraits>
|
||||
<li>
|
||||
<def>rjw_genes_sadist</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>
|
||||
<defName>rjw_genes_masochist</defName>
|
||||
<label>masochist</label>
|
||||
|
@ -106,7 +81,7 @@
|
|||
<label>homosexual</label>
|
||||
<displayCategory>Reproduction</displayCategory>
|
||||
<description>This Gene makes you gay.</description>
|
||||
<iconPath>UI\Ideoligions\Universal\RoundC</iconPath>
|
||||
<iconPath>Genes/Icons/RoundC</iconPath>
|
||||
<biostatMet>0</biostatMet>
|
||||
<displayOrderInCategory>3</displayOrderInCategory>
|
||||
<forcedTraits>
|
||||
|
@ -134,7 +109,7 @@
|
|||
<label>bisexual</label>
|
||||
<displayCategory>Reproduction</displayCategory>
|
||||
<description>Carriers of this Gene are Bisexual.</description>
|
||||
<iconPath>UI\Ideoligions\Universal\RoundC</iconPath>
|
||||
<iconPath>Genes/Icons/RoundC</iconPath>
|
||||
<biostatMet>0</biostatMet>
|
||||
<displayOrderInCategory>4</displayOrderInCategory>
|
||||
<forcedTraits>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
partially filled)</description>
|
||||
<biostatCpx>1</biostatCpx>
|
||||
<biostatMet>-2</biostatMet>
|
||||
<iconPath>UI/Memes/FleshPurity</iconPath>
|
||||
<iconPath>Genes/Icons/FleshPurity</iconPath>
|
||||
<displayOrderInCategory>1</displayOrderInCategory>
|
||||
</GeneDef>
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(Partner stays adult)</description>
|
||||
<biostatCpx>2</biostatCpx>
|
||||
<biostatMet>-2</biostatMet>
|
||||
<iconPath>UI/Ideoligions/FireLeaves</iconPath>
|
||||
<iconPath>Genes/Icons/FireLeaves</iconPath>
|
||||
<displayOrderInCategory>2</displayOrderInCategory>
|
||||
<modExtensions>
|
||||
<li Class="RJW_Genes.AgeTransferExtension">
|
||||
|
@ -180,4 +180,59 @@
|
|||
</modExtensions>
|
||||
</GeneDef>
|
||||
|
||||
<GeneDef ParentName="SpecialBase">
|
||||
<defName>rjw_genes_feminizer</defName>
|
||||
<label>feminizer</label>
|
||||
<description>Carriers with this gene slowly turn male sexual partners into females.</description>
|
||||
<iconPath>UI/Icons/Genes/Gene_PsychicBonding</iconPath>
|
||||
<displayOrderInCategory>31</displayOrderInCategory>
|
||||
<biostatCpx>5</biostatCpx>
|
||||
<biostatMet>-1</biostatMet>
|
||||
<modExtensions>
|
||||
<li Class="RJW_Genes.ImmunityAgainstGenesExtension">
|
||||
<givesImmunityAgainst>
|
||||
<li>rjw_genes_feminizer</li>
|
||||
</givesImmunityAgainst>
|
||||
</li>
|
||||
<li Class="RJW_Genes.HediffIncreaseOnSexExtension">
|
||||
<hediffDef>rjw_genes_feminization_progress</hediffDef>
|
||||
<canCreateHediff>true</canCreateHediff>
|
||||
<severityIncrease>0.01</severityIncrease>
|
||||
<applicationChance>1.00</applicationChance>
|
||||
<applicableForWomen>false</applicableForWomen>
|
||||
<applicableForMen>true</applicableForMen>
|
||||
<requiresPenetrativeSex>false</requiresPenetrativeSex>
|
||||
</li>
|
||||
</modExtensions>
|
||||
</GeneDef>
|
||||
|
||||
|
||||
<GeneDef ParentName="SpecialBase">
|
||||
<defName>rjw_genes_twinkifier</defName>
|
||||
<label>twinkifier</label>
|
||||
<description>Carriers with this gene slowly turn male sexual partners into breedabel cute twinks.</description>
|
||||
<iconPath>UI/Icons/Genes/Gene_PsychicBonding</iconPath>
|
||||
<displayOrderInCategory>50</displayOrderInCategory>
|
||||
<biostatCpx>4</biostatCpx>
|
||||
<biostatMet>0</biostatMet>
|
||||
<modExtensions>
|
||||
<li Class="RJW_Genes.ImmunityAgainstGenesExtension">
|
||||
<givesImmunityAgainst>
|
||||
<li>rjw_genes_twinkifier</li>
|
||||
</givesImmunityAgainst>
|
||||
</li>
|
||||
<li Class="RJW_Genes.HediffIncreaseOnSexExtension">
|
||||
<hediffDef>rjw_genes_twinkification_progress</hediffDef>
|
||||
<canCreateHediff>true</canCreateHediff>
|
||||
<severityIncrease>0.99</severityIncrease>
|
||||
<applicationChance>1.00</applicationChance>
|
||||
<applicableForWomen>false</applicableForWomen>
|
||||
<applicableForMen>true</applicableForMen>
|
||||
<requiresPenetrativeSex>false</requiresPenetrativeSex>
|
||||
</li>
|
||||
</modExtensions>
|
||||
</GeneDef>
|
||||
|
||||
|
||||
|
||||
</Defs>
|
147
Common/Defs/HediffDefs/Hediffs_InfectiveGenderChanges.xml
Normal file
147
Common/Defs/HediffDefs/Hediffs_InfectiveGenderChanges.xml
Normal file
|
@ -0,0 +1,147 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<HediffDef>
|
||||
<defName>rjw_genes_feminization_progress</defName>
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<label>feminization</label>
|
||||
<description>Something is changing this pawn - there is a chance to develop female features
|
||||
upon sex.</description>
|
||||
<scenarioCanAdd>false</scenarioCanAdd>
|
||||
<maxSeverity>1.0</maxSeverity>
|
||||
<isBad>false</isBad>
|
||||
<tendable>false</tendable>
|
||||
<comps>
|
||||
<li Class="HediffCompProperties_SeverityPerDay">
|
||||
<severityPerDay>-0.01</severityPerDay>
|
||||
</li>
|
||||
</comps>
|
||||
<stages>
|
||||
|
||||
<li>
|
||||
<label>neglectable</label>
|
||||
<becomeVisible>false</becomeVisible>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>minor</label>
|
||||
<minSeverity>0.6</minSeverity>
|
||||
<becomeVisible>true</becomeVisible>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>-0.5</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
<statOffsets>
|
||||
<Vulnerability>0.25</Vulnerability>
|
||||
</statOffsets>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>severe</label>
|
||||
<minSeverity>0.8</minSeverity>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>-0.05</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
<becomeVisible>true</becomeVisible>
|
||||
<statOffsets>
|
||||
<Vulnerability>0.5</Vulnerability>
|
||||
<SexFrequency>0.25</SexFrequency>
|
||||
</statOffsets>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>critical</label>
|
||||
<minSeverity>0.9</minSeverity>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>-0.1</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
<becomeVisible>true</becomeVisible>
|
||||
<statOffsets>
|
||||
<Vulnerability>1.0</Vulnerability>
|
||||
<SexFrequency>0.5</SexFrequency>
|
||||
</statOffsets>
|
||||
</li>
|
||||
</stages>
|
||||
</HediffDef>
|
||||
|
||||
|
||||
<HediffDef>
|
||||
<defName>rjw_genes_twinkification_progress</defName>
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<label>twinkification</label>
|
||||
<description>Something is changing this pawn - there is a chance to turn into a cute,
|
||||
breedable twink upon sex.</description>
|
||||
<scenarioCanAdd>false</scenarioCanAdd>
|
||||
<maxSeverity>1.0</maxSeverity>
|
||||
<isBad>false</isBad>
|
||||
<tendable>false</tendable>
|
||||
<comps>
|
||||
<li Class="HediffCompProperties_SeverityPerDay">
|
||||
<severityPerDay>-0.01</severityPerDay>
|
||||
</li>
|
||||
</comps>
|
||||
<stages>
|
||||
|
||||
<li>
|
||||
<label>neglectable</label>
|
||||
<becomeVisible>false</becomeVisible>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>minor</label>
|
||||
<minSeverity>0.6</minSeverity>
|
||||
<becomeVisible>true</becomeVisible>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>-0.5</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
<statOffsets>
|
||||
<Vulnerability>0.25</Vulnerability>
|
||||
</statOffsets>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>severe</label>
|
||||
<minSeverity>0.8</minSeverity>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>-0.05</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
<becomeVisible>true</becomeVisible>
|
||||
<statOffsets>
|
||||
<Vulnerability>0.5</Vulnerability>
|
||||
<SexFrequency>0.25</SexFrequency>
|
||||
</statOffsets>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>critical</label>
|
||||
<minSeverity>0.9</minSeverity>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>-0.1</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
<becomeVisible>true</becomeVisible>
|
||||
<statOffsets>
|
||||
<Vulnerability>1.5</Vulnerability>
|
||||
<SexFrequency>0.5</SexFrequency>
|
||||
</statOffsets>
|
||||
</li>
|
||||
</stages>
|
||||
</HediffDef>
|
||||
|
||||
</Defs>
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
<li TKey="BestialityGeneSettings">The Settings for Animal-Gene Inheritance are distributed between RJW-Pregnancy-Settings and their own Mod-Options.</li>
|
||||
|
||||
<li TKey="FertilaAnusJoke">Children born by pawns with the `Fertile Anus` gene might be bullied at school, but they can still live a fulfilling and happy life.</li>
|
||||
|
||||
</tips>
|
||||
</TipSetDef>
|
||||
|
||||
|
|
BIN
Common/Textures/Genes/Icons/FireLeaves.png
Normal file
BIN
Common/Textures/Genes/Icons/FireLeaves.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
Common/Textures/Genes/Icons/FleshPurity.png
Normal file
BIN
Common/Textures/Genes/Icons/FleshPurity.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
BIN
Common/Textures/Genes/Icons/RoundC.png
Normal file
BIN
Common/Textures/Genes/Icons/RoundC.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
Common/Textures/Genes/Icons/TrialDefend.png
Normal file
BIN
Common/Textures/Genes/Icons/TrialDefend.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -1,5 +1,8 @@
|
|||
# RJW-Genes [NSFW]
|
||||
|
||||
[](https://buymeacoffee.com/vegapnk)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
This mod adds genes related and based on RJW to Rimworld.
|
||||
|
||||
## Current Features
|
||||
|
|
23
Source/Common/Defs/HediffIncreaseOnSexExtension.cs
Normal file
23
Source/Common/Defs/HediffIncreaseOnSexExtension.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class HediffIncreaseOnSexExtension: DefModExtension
|
||||
{
|
||||
public HediffDef hediffDef;
|
||||
public float severityIncrease;
|
||||
public float applicationChance;
|
||||
|
||||
public bool canCreateHediff;
|
||||
|
||||
public bool applicableForWomen;
|
||||
public bool applicableForMen;
|
||||
public bool requiresPenetrativeSex;
|
||||
}
|
||||
|
||||
}
|
80
Source/Common/patches/Patch_HediffIncreaseOnSex.cs
Normal file
80
Source/Common/patches/Patch_HediffIncreaseOnSex.cs
Normal file
|
@ -0,0 +1,80 @@
|
|||
using HarmonyLib;
|
||||
using rjw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This patch "only" applies the hediff increase on sex.
|
||||
/// It checks for the hediff, creates it if necessary and applicable,
|
||||
/// and increases it based on the severity, chance and genders specified in the Extension.
|
||||
///
|
||||
/// Some hediffs want follow up logic, e.g. the Feminization Gene,
|
||||
/// which is handled in an extra patch (that requires the hediff to be present already).
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(SexUtility), "Aftersex")]
|
||||
public class Patch_HediffIncreaseOnSex
|
||||
{
|
||||
|
||||
public static void Postfix(SexProps props)
|
||||
{
|
||||
if (props == null || props.pawn == null || props.partner == null || props.partner.IsAnimal() || props.pawn.IsAnimal())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Pawn pawn = props.pawn;
|
||||
Pawn partner = props.partner;
|
||||
|
||||
if (pawn.genes == null || partner.genes == null) return;
|
||||
|
||||
TryApplyHediffsOfSex(pawn, partner, props);
|
||||
TryApplyHediffsOfSex(partner, pawn, props);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks for every gene in a pawn if it applies a hediff or the severity of an existing hediff in a sexual partner.
|
||||
/// If the checks pass, the hediff is added or changed accordingly.
|
||||
/// </summary>
|
||||
/// <param name="pawn">Pawn that holds (one or many) genes that might apply a hediff change</param>
|
||||
/// <param name="partner">Pawn that will receive or alter any hediffs, if applicable</param>
|
||||
/// <param name="props">The Sexprops, used for checking if sex is penetrative</param>
|
||||
static void TryApplyHediffsOfSex(Pawn pawn, Pawn partner, SexProps props)
|
||||
{
|
||||
var random = new Random();
|
||||
|
||||
foreach (Gene gene in pawn.genes.GenesListForReading)
|
||||
{
|
||||
HediffIncreaseOnSexExtension ext = gene.def.GetModExtension<HediffIncreaseOnSexExtension>();
|
||||
if (ext == null) continue;
|
||||
|
||||
if (DiseaseHelper.IsImmuneAgainstGeneticDisease(partner, gene.def)) continue;
|
||||
if (ext.requiresPenetrativeSex && DiseaseHelper.IsPenetrativeSex(props)) continue;
|
||||
if (!ext.applicableForMen && partner.gender == Gender.Male) continue;
|
||||
if (!ext.applicableForWomen && partner.gender == Gender.Female) continue;
|
||||
if (random.NextDouble() >= ext.applicationChance) continue;
|
||||
|
||||
Hediff hediff = partner.health.hediffSet.GetFirstHediffOfDef(ext.hediffDef);
|
||||
if (hediff == null)
|
||||
{
|
||||
if (!ext.canCreateHediff) continue;
|
||||
hediff = partner.health.GetOrAddHediff(ext.hediffDef);
|
||||
hediff.Severity = 0.01f;
|
||||
ModLog.Debug($"{partner} got hediff {hediff.def.defName} from Patch_HediffIncreaseOnSex ({gene.def.defName}) upon sex with {pawn}");
|
||||
}
|
||||
float initial_severity = hediff.Severity;
|
||||
ModLog.Debug($"{partner}s hediff {hediff.def.defName} was changed by Patch_HediffIncreaseOnSex ({gene.def.defName}) upon sex with {pawn} [from {initial_severity} to {initial_severity + ext.severityIncrease}]");
|
||||
hediff.Severity += ext.severityIncrease;
|
||||
|
||||
// DevNote: I also want to have "negative" hediff changes here, but I think its not necessary. Once the severity reaches 0, or below, the hediff should remove itself.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -108,6 +108,8 @@ namespace RJW_Genes
|
|||
public static readonly GeneDef rjw_genes_sexual_genetic_swap;
|
||||
public static readonly GeneDef rjw_genes_sexual_genetic_thief;
|
||||
public static readonly GeneDef rjw_genes_pregnancy_overwrite;
|
||||
public static readonly GeneDef rjw_genes_feminizer;
|
||||
public static readonly GeneDef rjw_genes_twinkifier;
|
||||
|
||||
// Cosmetic
|
||||
public static readonly GeneDef rjw_genes_succubus_tail;
|
||||
|
@ -131,6 +133,12 @@ namespace RJW_Genes
|
|||
public static readonly GeneDef rjw_genes_major_vulnerability;
|
||||
public static readonly GeneDef rjw_genes_fluctual_sexual_needs;
|
||||
public static readonly GeneDef rjw_genes_size_blinded;
|
||||
public static readonly GeneDef rjw_genes_infectious_low_fertility;
|
||||
public static readonly GeneDef rjw_genes_infectious_increased_sex_need;
|
||||
public static readonly GeneDef rjw_genes_infectious_bisexuality;
|
||||
public static readonly GeneDef rjw_genes_infectious_homosexuality;
|
||||
public static readonly GeneDef rjw_genes_infectious_hypersexuality;
|
||||
public static readonly GeneDef rjw_genes_stretcher;
|
||||
|
||||
//Other Defs
|
||||
public static readonly XenotypeDef rjw_genes_succubus;
|
||||
|
|
78
Source/Genes/Special/Patches/Patch_Twinkifier.cs
Normal file
78
Source/Genes/Special/Patches/Patch_Twinkifier.cs
Normal file
|
@ -0,0 +1,78 @@
|
|||
using HarmonyLib;
|
||||
using rjw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
/// <summary>
|
||||
/// This patch handles the changes produced by `rjw_genes_twinkifier`.
|
||||
/// It requires the hediff `rjw_genes_twinkification_in_progress` which is managed separately, in `Patch_HediffIncreaseOnSex`.
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(SexUtility), "Aftersex")]
|
||||
public static class Patch_Twinkifier
|
||||
{
|
||||
const float MINOR_APPLICATION_CHANCE = 0.25f; // = 25% to have a minor transformation
|
||||
const float MAJOR_APPLICATION_CHANCE = 0.10f; // = 10% to have a major transformation
|
||||
|
||||
public static void Postfix(SexProps props)
|
||||
{
|
||||
if (props == null || props.pawn == null || !props.hasPartner() || props.partner == null)
|
||||
return;
|
||||
if (props.pawn.IsAnimal() || props.partner.IsAnimal())
|
||||
return;
|
||||
|
||||
ApplyTwinkification(props.pawn);
|
||||
ApplyTwinkification(props.partner);
|
||||
}
|
||||
|
||||
private static void ApplyTwinkification(Pawn pawn)
|
||||
{
|
||||
if (pawn == null) return;
|
||||
Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.rjw_genes_twinkification_progress);
|
||||
if (hediff == null) return;
|
||||
|
||||
var Random = new Random();
|
||||
switch (hediff.SeverityLabel)
|
||||
{
|
||||
case "severe":
|
||||
case "critical":
|
||||
{
|
||||
if (Random.NextDouble() < MAJOR_APPLICATION_CHANCE)
|
||||
majorChange(pawn);
|
||||
} break;
|
||||
case "minor":
|
||||
{
|
||||
if (Random.NextDouble() < MINOR_APPLICATION_CHANCE)
|
||||
minorChange(pawn);
|
||||
} break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void minorChange(Pawn pawn)
|
||||
{
|
||||
// Minor Infectious Vulnerability
|
||||
// Smaller Genitalia
|
||||
// Remove Beard
|
||||
// Thin Body Type
|
||||
}
|
||||
|
||||
private static void majorChange(Pawn pawn)
|
||||
{
|
||||
// Final Gene-Pool should have:
|
||||
// - Fragile (?)
|
||||
// - Infectious Vulnerability
|
||||
// - Infectious Homosexuality
|
||||
// - Beauty
|
||||
// - Fertile Anus
|
||||
|
||||
pawn.genes.AddGene(GeneDefOf.rjw_genes_fertile_anus, !RJW_Genes_Settings.rjw_genes_genetic_disease_as_endogenes);
|
||||
pawn.genes.AddGene(GeneDefOf.rjw_genes_infectious_homosexuality, !RJW_Genes_Settings.rjw_genes_genetic_disease_as_endogenes);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,6 +20,10 @@ namespace RJW_Genes
|
|||
public static readonly HediffDef rjw_genes_orgasmic_mytosis_hediff;
|
||||
public static readonly HediffDef rjw_genes_mytosis_shock_hediff;
|
||||
|
||||
public static readonly HediffDef rjw_genes_twinkification_progress;
|
||||
public static readonly HediffDef rjw_genes_feminization_progress;
|
||||
|
||||
// Note: Counter does meant it counters it, not it's counting
|
||||
[MayRequire("LustLicentia.RJWLabs")] public static readonly HediffDef rjw_genes_cumstuffed_counter;
|
||||
[MayRequire("LustLicentia.RJWLabs")] public static readonly HediffDef rjw_genes_cumflation_counter;
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
<Compile Include="Animal_Inheritance\Defs\BestialityGeneInheritanceDef.cs" />
|
||||
<Compile Include="Common\Defs\ChanceExtension.cs" />
|
||||
<Compile Include="Common\Defs\DistanceExtension.cs" />
|
||||
<Compile Include="Common\Defs\HediffIncreaseOnSexExtension.cs" />
|
||||
<Compile Include="Common\Defs\ModExtensionHelper.cs" />
|
||||
<Compile Include="Common\Defs\MultiplierExtension.cs" />
|
||||
<Compile Include="Common\Defs\TickBasedChanceExtension.cs" />
|
||||
|
@ -68,6 +69,7 @@
|
|||
<Compile Include="Common\ModLog.cs" />
|
||||
<Compile Include="Common\Defs\TickIntervalExtension.cs" />
|
||||
<Compile Include="Common\Patches\PatchImplants.cs" />
|
||||
<Compile Include="Common\Patches\Patch_HediffIncreaseOnSex.cs" />
|
||||
<Compile Include="Common\Patches\Patch_ParentRelationUtility_GetParents.cs" />
|
||||
<Compile Include="Genes\Breeding\Abilities\CompAbilityEffect_MatingCall.cs" />
|
||||
<Compile Include="Genes\Breeding\Abilities\CompAbilityEffect_PheromoneSpit.cs" />
|
||||
|
@ -195,6 +197,7 @@
|
|||
<Compile Include="Genes\Special\Patches\Patch_OrgasmMytosis.cs" />
|
||||
<Compile Include="Genes\Special\Patches\Patch_PregnancyOverwrite.cs" />
|
||||
<Compile Include="Genes\Special\Patches\Patch_SexualTamer.cs" />
|
||||
<Compile Include="Genes\Special\Patches\Patch_Twinkifier.cs" />
|
||||
<Compile Include="Genes\Special\Thoughts\ThoughtWorker_Aphrodisiac_Pheromones_Social.cs" />
|
||||
<Compile Include="LetterDefOf.cs" />
|
||||
<Compile Include="Interactions\SuccubusTailjob\CompAbility_SexInteractionRequirements.cs" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue