diff --git a/Common/Defs/HediffDefs/Hediffs_OrgasmRush.xml b/Common/Defs/HediffDefs/Hediffs_OrgasmRush.xml
new file mode 100644
index 0000000..f68663f
--- /dev/null
+++ b/Common/Defs/HediffDefs/Hediffs_OrgasmRush.xml
@@ -0,0 +1,78 @@
+
+
+
+
+ rjw_genes_orgasm_rush_hediff
+ HediffWithComps
+
+ Xenotypes with this Gene are pushed beyond normal limits when they have an orgasm.
+ (240,200,110)
+ false
+ 1.0
+ false
+ false
+
+
+ -0.75
+
+
+
+
+
+
+ 4
+ 4
+
+
+
+ Consciousness
+ 0.05
+
+
+
+
+
+ 0.4
+
+ 8
+ 8
+
+
+
+ Moving
+ 0.08
+
+
+ Consciousness
+ 0.08
+
+
+
+
+
+ 0.7
+
+ 10
+ 10
+
+
+
+ Moving
+ 0.1
+
+
+ Consciousness
+ 0.1
+
+
+ BloodPumping
+ 0.1
+
+
+
+
+
+
+
+
+
diff --git a/Source/GeneDefOf.cs b/Source/GeneDefOf.cs
index 744eb11..631602f 100644
--- a/Source/GeneDefOf.cs
+++ b/Source/GeneDefOf.cs
@@ -71,5 +71,7 @@ namespace RJW_Genes
// Special
public static readonly GeneDef rjw_genes_orgasm_rush;
+
+ public static readonly HediffDef rjw_genes_orgasm_rush_hediff;
}
}
diff --git a/Source/Genes/Special/Patch_OrgasmRush.cs b/Source/Genes/Special/Patch_OrgasmRush.cs
index 0b881f2..fefcb7a 100644
--- a/Source/Genes/Special/Patch_OrgasmRush.cs
+++ b/Source/Genes/Special/Patch_OrgasmRush.cs
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Verse;
namespace RJW_Genes
{
@@ -14,6 +15,7 @@ namespace RJW_Genes
{
private const float REST_INCREASE = 0.05f;
+ private const float ORGASMS_NEEDED_FOR_SUPERCHARGE = 3.0f;
public static void Postfix(SexProps props)
{
@@ -23,9 +25,37 @@ namespace RJW_Genes
if (props.pawn.genes != null && props.pawn.genes.HasGene(GeneDefOf.rjw_genes_orgasm_rush))
{
- props.pawn.needs.rest.CurLevel += REST_INCREASE;
- }
+
+ // Pump up Wake-Ness
+ if (props.pawn.needs.rest != null)
+ props.pawn.needs.rest.CurLevel += REST_INCREASE;
+
+ // Add or Update Hediff for Orgasm Rush
+ Hediff rush = GetOrgasmRushHediff(props.pawn);
+ float added_severity = props.orgasms / ORGASMS_NEEDED_FOR_SUPERCHARGE;
+ rush.Severity += added_severity;
+ // Severity should be capped to 1 by the XML logic
+ }
+
+ }
+
+ ///
+ /// Helps to get the Orgasm Rush Hediff of a Pawn. If it does not exist, one is added.
+ ///
+ /// The pawn that had the orgasm, for which a hediff is looked up or created.
+ ///
+ public static Hediff GetOrgasmRushHediff(Pawn orgasmed)
+ {
+ Hediff orgasmRushHediff = orgasmed.health.hediffSet.GetFirstHediffOfDef(GeneDefOf.rjw_genes_orgasm_rush_hediff);
+ if (orgasmRushHediff == null)
+ {
+ orgasmRushHediff = HediffMaker.MakeHediff(GeneDefOf.rjw_genes_orgasm_rush_hediff, orgasmed);
+ orgasmRushHediff.Severity = 0;
+ orgasmed.health.AddHediff(orgasmRushHediff);
+ }
+ return orgasmRushHediff;
}
}
+
}
diff --git a/Source/Rjw-Genes.csproj b/Source/Rjw-Genes.csproj
index c7b5a48..48ab4dc 100644
--- a/Source/Rjw-Genes.csproj
+++ b/Source/Rjw-Genes.csproj
@@ -27,16 +27,14 @@
False
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll
- False
+ ..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll
..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\licentia-labs-master\Assemblies\LicentiaLabs.dll
False
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\rjw-master\1.4\Assemblies\RJW.dll
- False
+ ..\..\rjw\1.4\Assemblies\RJW.dll
@@ -51,12 +49,14 @@
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.dll
+ ..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll
False
- ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll
- False
+ ..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll
+
+
+ ..\..\..\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll