diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0db6c9f..08005c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ Features:
- RJW Race-Support Compatibility (#12,#13, Shabakur)
- Animal Gene Inheritance Gene-Chance Multiplier per Setting (#13, Shabakur)
- Lots of Debug-Only Logging for Animal Gene Inheritance
+- Mod-Settings
Succubus:
@@ -22,6 +23,7 @@ Fixes:
- Futa Gene only triggers if Pawn is not a futa already (#2)
- Genitalia Resizing triggers on 20th Birthday (#11)
- RJW-Gene-Inheritance Settings now do things (#13, Shabakur)
+- Check for Animals in Orgasm Rush, no Orgasm Rush for and from Animals (#15)
# 1.0.1 (2022-12-20)
diff --git a/Common/Defs/Genes/GeneDefs_LifeForce.xml b/Common/Defs/Genes/GeneDefs_LifeForce.xml
index efa275e..41cba40 100644
--- a/Common/Defs/Genes/GeneDefs_LifeForce.xml
+++ b/Common/Defs/Genes/GeneDefs_LifeForce.xml
@@ -78,7 +78,7 @@
rjw_genes_cockeatercockeater
- Carriers of this gene are able eat cocks to restore their fertilin supply.
+ Carriers of this gene are able eat cocks to restore their fertilin supply. Cocks are consumed during that process.Things/Mote/Heartrjw_genes_lifeforce11
@@ -154,7 +154,7 @@
rjw_genes_cum_eater
- Carriers of this gene are able to absorb fertilin through eating cum.
+ Carriers of this gene are able to absorb fertilin through eating cum. This includes oral sex, eating cum for food or sucking out cumflated pawns. Things/Mote/Heartrjw_genes_lifeforce1
@@ -187,7 +187,7 @@
rjw_genes_drainer
- Carriers of this gene are able to absorb a great amount of fertilin by draining the vitality of the partner.
+ Carriers of this gene are able to absorb a great amount of fertilin by draining the vitality of the partner. This is done passively through having sex with a non-drained pawn that does not have this gene.Things/Mote/Heartrjw_genes_lifeforce4
diff --git a/Common/Defs/HediffDefs/Hediffs_Fertilin.xml b/Common/Defs/HediffDefs/Hediffs_Fertilin.xml
index cb01a23..8c29092 100644
--- a/Common/Defs/HediffDefs/Hediffs_Fertilin.xml
+++ b/Common/Defs/HediffDefs/Hediffs_Fertilin.xml
@@ -45,13 +45,13 @@
rjw_genes_succubus_drainedHediffWithComps
- The vitality of this pawn has been drained.
+ The vitality of this pawn has been drained. Cannot be drained again until fully recovered.(1,0,0.5)1.01.0
- My cock was eaten directly of my body, I am devestated.
+ My cock was eaten directly of my body, I am devestated. This is not what good head feels like. -30
diff --git a/Source/Animal_Inheritance/BestialityGeneInheritanceDef.cs b/Source/Animal_Inheritance/Defs/BestialityGeneInheritanceDef.cs
similarity index 100%
rename from Source/Animal_Inheritance/BestialityGeneInheritanceDef.cs
rename to Source/Animal_Inheritance/Defs/BestialityGeneInheritanceDef.cs
diff --git a/Source/Animal_Inheritance/RaceGeneDef.cs b/Source/Animal_Inheritance/Defs/RaceGeneDef.cs
similarity index 100%
rename from Source/Animal_Inheritance/RaceGeneDef.cs
rename to Source/Animal_Inheritance/Defs/RaceGeneDef.cs
diff --git a/Source/Animal_Inheritance/RaceGeneDef_Helper.cs b/Source/Animal_Inheritance/Defs/RaceGeneDef_Helper.cs
similarity index 100%
rename from Source/Animal_Inheritance/RaceGeneDef_Helper.cs
rename to Source/Animal_Inheritance/Defs/RaceGeneDef_Helper.cs
diff --git a/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs b/Source/Animal_Inheritance/Patches/Patch_RJW_BestialityPregnancyUtility.cs
similarity index 96%
rename from Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs
rename to Source/Animal_Inheritance/Patches/Patch_RJW_BestialityPregnancyUtility.cs
index da5ac8d..c5f6366 100644
--- a/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs
+++ b/Source/Animal_Inheritance/Patches/Patch_RJW_BestialityPregnancyUtility.cs
@@ -11,7 +11,7 @@ using rjw;
namespace RJW_BGS
{
[HarmonyPatch(typeof(Hediff_BasePregnancy), "Initialize")]
- public static class PatchRJWBestialityPregnancyUtility
+ public static class Patch_RJW_BestialityPregnancyUtility
{
[HarmonyPostfix]
public static void AddGenes(Pawn mother, Pawn dad, ref Hediff_BasePregnancy __instance)
diff --git a/Source/Animal_Inheritance/PatchRJWHediffInsect_Egg.cs b/Source/Animal_Inheritance/Patches/Patch_RJW_HediffInsect_Egg.cs
similarity index 96%
rename from Source/Animal_Inheritance/PatchRJWHediffInsect_Egg.cs
rename to Source/Animal_Inheritance/Patches/Patch_RJW_HediffInsect_Egg.cs
index 587571f..9861537 100644
--- a/Source/Animal_Inheritance/PatchRJWHediffInsect_Egg.cs
+++ b/Source/Animal_Inheritance/Patches/Patch_RJW_HediffInsect_Egg.cs
@@ -7,7 +7,7 @@ using rjw;
namespace RJW_BGS
{
[HarmonyPatch(typeof(Hediff_InsectEgg), "GiveBirth")]
- public static class PatchRJWHediffInsect_Egg
+ public static class Patch_RJW_HediffInsect_Egg
{
[HarmonyTranspiler]
public static IEnumerable Transpiler(IEnumerable instructions)
diff --git a/Source/Animal_Inheritance/PatchVanillaPregnancyUtility.cs b/Source/Animal_Inheritance/Patches/Patch_Vanilla_PregnancyUtility.cs
similarity index 95%
rename from Source/Animal_Inheritance/PatchVanillaPregnancyUtility.cs
rename to Source/Animal_Inheritance/Patches/Patch_Vanilla_PregnancyUtility.cs
index afbfa09..28f872f 100644
--- a/Source/Animal_Inheritance/PatchVanillaPregnancyUtility.cs
+++ b/Source/Animal_Inheritance/Patches/Patch_Vanilla_PregnancyUtility.cs
@@ -19,7 +19,7 @@ namespace RJW_BGS
//typeof(bool)
}
)]
- public static class PatchVanillaPregnancyUtility
+ public static class Patch_Vanilla_PregnancyUtility
{
[HarmonyPostfix]
public static void AnimalInheritedGenes(Pawn father, Pawn mother, ref GeneSet __result)
diff --git a/Source/Animal_Inheritance/RJW_BGSSettings.cs b/Source/Animal_Inheritance/Settings/RJW_BGSSettings.cs
similarity index 100%
rename from Source/Animal_Inheritance/RJW_BGSSettings.cs
rename to Source/Animal_Inheritance/Settings/RJW_BGSSettings.cs
diff --git a/Source/Animal_Inheritance/RJW_BGSSettingsController.cs b/Source/Animal_Inheritance/Settings/RJW_BGSSettingsController.cs
similarity index 100%
rename from Source/Animal_Inheritance/RJW_BGSSettingsController.cs
rename to Source/Animal_Inheritance/Settings/RJW_BGSSettingsController.cs
diff --git a/Source/GeneDefOf.cs b/Source/GeneDefOf.cs
index 7637d57..f8a84f1 100644
--- a/Source/GeneDefOf.cs
+++ b/Source/GeneDefOf.cs
@@ -87,6 +87,7 @@ namespace RJW_Genes
public static readonly GeneDef rjw_genes_drainer;
public static readonly GeneDef rjw_genes_seduce;
public static readonly GeneDef rjw_genes_paralysingkiss;
+ public static readonly GeneDef rjw_genes_cockeater;
// Cosmetic
public static readonly GeneDef rjw_genes_succubus_tail;
diff --git a/Source/Genes/GeneUtility.cs b/Source/Genes/GeneUtility.cs
index 9ec55c4..66cfd74 100644
--- a/Source/Genes/GeneUtility.cs
+++ b/Source/Genes/GeneUtility.cs
@@ -38,6 +38,7 @@ namespace RJW_Genes
}
}
+
public static bool HasLowLifeForce(Pawn pawn)
{
if (HasLifeForce(pawn))
@@ -118,5 +119,7 @@ namespace RJW_Genes
public static bool HasParalysingKiss(Pawn pawn) { return HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_paralysingkiss); }
public static bool HasSeduce(Pawn pawn) { return HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_seduce); }
public static bool IsSexualDrainer(Pawn pawn) { return HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_drainer); }
+ public static bool IsCumEater(Pawn pawn) { return HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_cum_eater); }
+
}
}
\ No newline at end of file
diff --git a/Source/Genes/Life_Force/Abilities/CompAbilityEffect_CockEater.cs b/Source/Genes/Life_Force/Abilities/CompAbilityEffect_CockEater.cs
index d4d12ea..dc0f0fa 100644
--- a/Source/Genes/Life_Force/Abilities/CompAbilityEffect_CockEater.cs
+++ b/Source/Genes/Life_Force/Abilities/CompAbilityEffect_CockEater.cs
@@ -1,16 +1,17 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Verse;
-using UnityEngine;
+using Verse;
using RimWorld;
using rjw;
-using rjw.Modules.Interactions.Helpers;
namespace RJW_Genes
{
+ ///
+ /// The CockEater Ability bites off the first found non-artifical cock of an target pawn.
+ /// It will restore {MINIMUM_LIFEFORCE_GAIN} multiplied by up to 2-times the Cock-Size.
+ /// Consuming a "towering" cock will give 2*{MINIMUM_LIFEFORCE_GAIN}, resulting in default 0.5f LifeForce.
+ /// This number is reduced for consuming animals by Settings.
+ ///
+ /// Balancing note: With the Cock-Eaters a drain of 0.08 is normal per day. This means 1 average cock should hold for 3-4 days of fertilin-fuel and half a day for an animal.
+ ///
public class CompAbilityEffect_CockEater : CompAbilityEffect
{
private new CompProperties_AbilityCockEater Props
@@ -20,16 +21,20 @@ namespace RJW_Genes
return (CompProperties_AbilityCockEater)this.props;
}
}
+
+ public const float MINIMUM_LIFEFORCE_GAIN = 0.25f;
+
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
{
base.Apply(target, dest);
- Pawn pawn = target.Pawn;
- if (pawn == null)
+ Pawn CockBiter = this.parent.pawn;
+ Pawn CockBittenPawn = target.Pawn;
+ if (CockBittenPawn == null)
{
return;
}
- var partBPR = Genital_Helper.get_genitalsBPR(pawn);
- var parts = Genital_Helper.get_PartsHediffList(pawn, partBPR);
+ var partBPR = Genital_Helper.get_genitalsBPR(CockBittenPawn);
+ var parts = Genital_Helper.get_PartsHediffList(CockBittenPawn, partBPR);
if (!parts.NullOrEmpty())
{
foreach (Hediff part in parts)
@@ -39,50 +44,67 @@ namespace RJW_Genes
if (Genital_Helper.is_penis(part))
{
- GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(this.parent.pawn), part.Severity); ;
- pawn.health.RemoveHediff(part);
- pawn.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.rjw_genes_cock_eaten, pawn, null);
- break; //Only one penis at the time
+ float gained_lifeforce = MINIMUM_LIFEFORCE_GAIN * (1 + part.Severity);
+ if (CockBittenPawn.IsAnimal())
+ {
+ gained_lifeforce *= RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor;
+ }
+ // Increase LifeForce for Biter
+ GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(CockBiter), gained_lifeforce);
+
+ // Handle Damage for Bitten
+ CockBittenPawn.health.RemoveHediff(part);
+ CockBittenPawn.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.rjw_genes_cock_eaten, CockBittenPawn, null);
+
+ //Only one penis at the time
+ break;
}
}
-
}
}
+ ///
+ /// For validity, there are a few checks:
+ /// 1. Target has Penis
+ /// 2. Target is either Colonist / Prisoner
+ /// 3. If the Target is an enemy, it must be downed.
+ ///
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
{
- Pawn pawn = target.Pawn;
- if (pawn != null)
+ Pawn CockBiteTarget = target.Pawn;
+ if (CockBiteTarget != null)
{
- bool flag = pawn.Faction == this.parent.pawn.Faction || pawn.IsPrisonerOfColony;
- bool flag2 = pawn.HostileTo(this.parent.pawn);
- bool flag3 = pawn.Downed;
- if (!flag && !(flag2 && flag3))
+ bool CockBiteTargetIsColonistOrPrisoner = CockBiteTarget.Faction == this.parent.pawn.Faction || CockBiteTarget.IsPrisonerOfColony;
+ bool CockBiteTargetIsHostile = CockBiteTarget.HostileTo(this.parent.pawn);
+ bool CockBiteTargetIsDowned = CockBiteTarget.Downed;
+
+ if (!CockBiteTargetIsColonistOrPrisoner && !(CockBiteTargetIsHostile && CockBiteTargetIsDowned))
{
if (throwMessages)
{
- if(flag2 && !flag3)
+ if(CockBiteTargetIsHostile && !CockBiteTargetIsDowned)
{
- Messages.Message(pawn.Name + " is hostile, but not downed.", pawn, MessageTypeDefOf.RejectInput, false);
+ Messages.Message(CockBiteTarget.Name + " is hostile, but not downed.", CockBiteTarget, MessageTypeDefOf.RejectInput, false);
}
- else if (!flag)
+ else if (!CockBiteTargetIsColonistOrPrisoner)
{
- Messages.Message(pawn.Name + " is not a part of the colony or hostile.", pawn, MessageTypeDefOf.RejectInput, false);
+ Messages.Message(CockBiteTarget.Name + " is not a part of the colony or hostile.", CockBiteTarget, MessageTypeDefOf.RejectInput, false);
}
}
return false;
}
- if (!Genital_Helper.has_penis_fertile(pawn))
+ if (!Genital_Helper.has_penis_fertile(CockBiteTarget))
{
if (throwMessages)
{
- Messages.Message(pawn.Name + " has no penis", pawn, MessageTypeDefOf.RejectInput, false);
+ Messages.Message(CockBiteTarget.Name + " has no penis", CockBiteTarget, MessageTypeDefOf.RejectInput, false);
}
return false;
}
}
return base.Valid(target, throwMessages);
}
+
public override bool GizmoDisabled(out string reason)
{
Pawn_GeneTracker genes = this.parent.pawn.genes;
diff --git a/Source/Genes/Life_Force/Abilities/CompAbilityEffect_PussyHeal.cs b/Source/Genes/Life_Force/Abilities/CompAbilityEffect_PussyHeal.cs
index 009588d..fdb0c7c 100644
--- a/Source/Genes/Life_Force/Abilities/CompAbilityEffect_PussyHeal.cs
+++ b/Source/Genes/Life_Force/Abilities/CompAbilityEffect_PussyHeal.cs
@@ -1,13 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
using Verse;
-using UnityEngine;
using RimWorld;
using rjw;
-using rjw.Modules.Interactions.Helpers;
namespace RJW_Genes
{
@@ -31,11 +25,8 @@ namespace RJW_Genes
bool any_wound_tended = AbilityUtility.Heal(pawn, this.Props.tendQualityRange);
if (any_wound_tended)
{
- MoteMaker.ThrowText(pawn.DrawPos, pawn.Map, "Sex healed wounds", 3.65f);
- //pawn.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.Pussy_Healed, pawn, null);
+ MoteMaker.ThrowText(pawn.DrawPos, pawn.Map, "Sex tended wounds", 3.65f);
}
- //this.AfterSex(any_wound_tended);
- //FleckMaker.AttachedOverlay(pawn, FleckDefOf.FlashHollow, Vector3.zero, 1.5f, -1f);
}
//Not yet implemented, but the heal should also trigger after normal sex
@@ -77,7 +68,7 @@ namespace RJW_Genes
}
return false;
}
- //AbilityUtility.ValidateHasTendableWound(pawn, throwMessages, this.parent);
+ //TODO: Only make pawns targetable that have tendable wounds
}
return base.Valid(target, throwMessages);
diff --git a/Source/Genes/Life_Force/IncidentWorker_SuccubusDreamVisit.cs b/Source/Genes/Life_Force/Events/SuccubusVisit/IncidentWorker_SuccubusDreamVisit.cs
similarity index 100%
rename from Source/Genes/Life_Force/IncidentWorker_SuccubusDreamVisit.cs
rename to Source/Genes/Life_Force/Events/SuccubusVisit/IncidentWorker_SuccubusDreamVisit.cs
diff --git a/Source/Genes/Life_Force/LordJob_SuccubusVisit.cs b/Source/Genes/Life_Force/Events/SuccubusVisit/LordJob_SuccubusVisit.cs
similarity index 100%
rename from Source/Genes/Life_Force/LordJob_SuccubusVisit.cs
rename to Source/Genes/Life_Force/Events/SuccubusVisit/LordJob_SuccubusVisit.cs
diff --git a/Source/Genes/Life_Force/Gene_LifeForce.cs b/Source/Genes/Life_Force/Genes/Gene_LifeForce.cs
similarity index 100%
rename from Source/Genes/Life_Force/Gene_LifeForce.cs
rename to Source/Genes/Life_Force/Genes/Gene_LifeForce.cs
diff --git a/Source/Genes/Life_Force/Gene_LifeForceDrain.cs b/Source/Genes/Life_Force/Genes/Gene_LifeForceDrain.cs
similarity index 100%
rename from Source/Genes/Life_Force/Gene_LifeForceDrain.cs
rename to Source/Genes/Life_Force/Genes/Gene_LifeForceDrain.cs
diff --git a/Source/Genes/Life_Force/IngestionOutcomeDoer_LifeForceOffset.cs b/Source/Genes/Life_Force/IngestionOutcomeDoer_LifeForceOffset.cs
index f3e50f1..fdfdefd 100644
--- a/Source/Genes/Life_Force/IngestionOutcomeDoer_LifeForceOffset.cs
+++ b/Source/Genes/Life_Force/IngestionOutcomeDoer_LifeForceOffset.cs
@@ -1,23 +1,22 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using RimWorld;
+using RimWorld;
using Verse;
namespace RJW_Genes
{
+ ///
+ /// This class checks for pawns with LifeForce and Cumeater Gene to add Fertilin when eating cum (the Item from RJW-Sexperience).
+ ///
public class IngestionOutcomeDoer_LifeForceOffset : IngestionOutcomeDoer
- {
+ {
+ public const float FERTILIN_PER_UNIT = 1f;
+
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
{
- if (GeneUtility.HasLifeForce(pawn) && GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_cum_eater))
+ if (GeneUtility.HasLifeForce(pawn) && GeneUtility.IsCumEater(pawn))
{
- float num = ingested.stackCount * this.FertilinPerUnit / 100;
+ float num = ingested.stackCount * FERTILIN_PER_UNIT / 100;
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(pawn), num);
}
}
- public float FertilinPerUnit = 1f;
}
}
diff --git a/Source/Genes/Life_Force/JobGiver_Flirt.cs b/Source/Genes/Life_Force/JobGivers/JobGiver_Flirt.cs
similarity index 100%
rename from Source/Genes/Life_Force/JobGiver_Flirt.cs
rename to Source/Genes/Life_Force/JobGivers/JobGiver_Flirt.cs
diff --git a/Source/Genes/Life_Force/JobGiver_GetLifeForce.cs b/Source/Genes/Life_Force/JobGivers/JobGiver_GetLifeForce.cs
similarity index 96%
rename from Source/Genes/Life_Force/JobGiver_GetLifeForce.cs
rename to Source/Genes/Life_Force/JobGivers/JobGiver_GetLifeForce.cs
index 3cb781b..3c0eff6 100644
--- a/Source/Genes/Life_Force/JobGiver_GetLifeForce.cs
+++ b/Source/Genes/Life_Force/JobGivers/JobGiver_GetLifeForce.cs
@@ -39,7 +39,7 @@ namespace RJW_Genes
{
return null;
}
- int num = Mathf.RoundToInt(((gene_lifeforce.targetValue - gene_lifeforce.Value) * 100 + 10) / ingestionOutcomeDoer.FertilinPerUnit);
+ int num = Mathf.RoundToInt(((gene_lifeforce.targetValue - gene_lifeforce.Value) * 100 + 10) / IngestionOutcomeDoer_LifeForceOffset.FERTILIN_PER_UNIT);
if (gatheredCum != null && num > 0)
{
Job job = JobMaker.MakeJob(RimWorld.JobDefOf.Ingest, gatheredCum);
diff --git a/Source/Genes/Life_Force/JobGiver_LifeForce_RandomRape.cs b/Source/Genes/Life_Force/JobGivers/JobGiver_LifeForce_RandomRape.cs
similarity index 100%
rename from Source/Genes/Life_Force/JobGiver_LifeForce_RandomRape.cs
rename to Source/Genes/Life_Force/JobGivers/JobGiver_LifeForce_RandomRape.cs
diff --git a/Source/Genes/Life_Force/JobGiver_TryQuickieWith.cs b/Source/Genes/Life_Force/JobGivers/JobGiver_TryQuickieWith.cs
similarity index 100%
rename from Source/Genes/Life_Force/JobGiver_TryQuickieWith.cs
rename to Source/Genes/Life_Force/JobGivers/JobGiver_TryQuickieWith.cs
diff --git a/Source/Genes/Life_Force/LifeForceMentalBreakWorker.cs b/Source/Genes/Life_Force/MentalStates/LifeForceMentalBreakWorker.cs
similarity index 100%
rename from Source/Genes/Life_Force/LifeForceMentalBreakWorker.cs
rename to Source/Genes/Life_Force/MentalStates/LifeForceMentalBreakWorker.cs
diff --git a/Source/Genes/Life_Force/LifeForceMentalState.cs b/Source/Genes/Life_Force/MentalStates/LifeForceMentalState.cs
similarity index 100%
rename from Source/Genes/Life_Force/LifeForceMentalState.cs
rename to Source/Genes/Life_Force/MentalStates/LifeForceMentalState.cs
diff --git a/Source/Genes/Life_Force/LifeForceMentalStateWorker.cs b/Source/Genes/Life_Force/MentalStates/LifeForceMentalStateWorker.cs
similarity index 100%
rename from Source/Genes/Life_Force/LifeForceMentalStateWorker.cs
rename to Source/Genes/Life_Force/MentalStates/LifeForceMentalStateWorker.cs
diff --git a/Source/Genes/Life_Force/Patch_SexTicks_ChangePsyfocus.cs b/Source/Genes/Life_Force/Patch_SexTicks_ChangePsyfocus.cs
deleted file mode 100644
index ea0d9d6..0000000
--- a/Source/Genes/Life_Force/Patch_SexTicks_ChangePsyfocus.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using HarmonyLib;
-using rjw;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using RimWorld;
-using Verse;
-
-namespace RJW_Genes
-{
-
- //[HarmonyPatch(typeof(JobDriver_Sex), nameof(JobDriver_Sex.ChangePsyfocus))]
- public static class Patch_SexTicks_ChangePsyfocus
- {
- //Using ChangePsyfocus as it is something that fires every 60 ticks
- public static void Postfix(ref JobDriver_Sex __instance, ref Pawn pawn, ref Thing target)
- {
- if (__instance.Sexprops.sexType == xxx.rjwSextype.Cunnilingus)
- {
- if (target != null)
- {
- Pawn pawn2 = target as Pawn;
- if (pawn2 != null)
- {
- //We need to know who the pawn on top is and if reverse we need to make the sub the pawn on top
- if (__instance.Sexprops.isRevese)
- {
-
- DrinkCumflation(pawn2, pawn);
- }
- else
- {
- //
- DrinkCumflation(pawn, pawn2);
- return;
- }
- }
- }
-
- }
- }
-
- public static void DrinkCumflation(Pawn dom, Pawn sub)
- {
- if (GeneUtility.HasLifeForce(sub) && GeneUtility.HasGeneNullCheck(sub,GeneDefOf.rjw_genes_cum_eater)&& dom.health.hediffSet.HasHediff(HediffDef.Named("Cumflation")))
- {
- Hediff cumflation = dom.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("Cumflation"));
- Gene_LifeForce gene_LifeForce = sub.genes.GetFirstGeneOfType();
- cumflation.Severity -= 0.1f;
- gene_LifeForce.Resource.Value += 0.05f;
- }
- }
- //Maybe I can store gene and hediff so I dont need to look them up every time
- }
-}
diff --git a/Source/Genes/Life_Force/Patch_Vanilla_Inheritance_Fertilin.cs b/Source/Genes/Life_Force/Patch_Vanilla_Inheritance_Fertilin.cs
deleted file mode 100644
index 94c427f..0000000
--- a/Source/Genes/Life_Force/Patch_Vanilla_Inheritance_Fertilin.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using HarmonyLib;
-using RimWorld;
-using Verse;
-
-namespace RJW_Genes
-{
- ///
- /// This Patch is applied to add a absorption gene for fertilin if it has none, but it does have the fertilin gene
- /// First tries to get one from the parents else chooses one of them at random
- /// the genes are determined and "simply added".
- ///
- [HarmonyPatch(typeof(PregnancyUtility), "GetInheritedGeneSet", new Type[]
- {
- typeof(Pawn),
- typeof(Pawn),
- //typeof(bool)
- }
- )]
- public static class PatchVanillaPregnancyFertilin
- {
- [HarmonyPostfix]
- public static void InheritedGenes(Pawn father, Pawn mother, ref GeneSet __result)
- {
- //Also make a setting for this
- if (__result.GenesListForReading.Contains(GeneDefOf.rjw_genes_lifeforce))
- {
- List gene_list = __result.GenesListForReading;
-
- //If no absorption gene get one from the parents, else a random one
- if(!(gene_list.Contains(GeneDefOf.rjw_genes_drainer) || gene_list.Contains(GeneDefOf.rjw_genes_cum_eater)
- || gene_list.Contains(GeneDefOf.rjw_genes_vaginal_absorber) || gene_list.Contains(GeneDefOf.rjw_genes_anal_absorber)))
- {
- List absorption_genes_list = new List { GeneDefOf.rjw_genes_drainer, GeneDefOf.rjw_genes_cum_eater
- , GeneDefOf.rjw_genes_vaginal_absorber, GeneDefOf.rjw_genes_anal_absorber };
- List absorption_genes_parents = new List();
- foreach (GeneDef geneDef in absorption_genes_list)
- {
- if(mother.genes != null && mother.genes.HasGene(geneDef))
- {
- absorption_genes_parents.Add(geneDef);
- }
- if (father.genes != null && father.genes.HasGene(geneDef))
- {
- absorption_genes_parents.Add(geneDef);
- }
- }
- if (!absorption_genes_parents.NullOrEmpty())
- {
- __result.AddGene(absorption_genes_parents.RandomElement());
- }
- else
- {
- __result.AddGene(absorption_genes_list.RandomElement());
- }
- }
- }
- }
- }
-}
diff --git a/Source/Genes/Life_Force/Patch_LifeForce.cs b/Source/Genes/Life_Force/Patches/Patch_SatisfyPersonal_LifeForceGain.cs
similarity index 55%
rename from Source/Genes/Life_Force/Patch_LifeForce.cs
rename to Source/Genes/Life_Force/Patches/Patch_SatisfyPersonal_LifeForceGain.cs
index cc4da8e..b368c1b 100644
--- a/Source/Genes/Life_Force/Patch_LifeForce.cs
+++ b/Source/Genes/Life_Force/Patches/Patch_SatisfyPersonal_LifeForceGain.cs
@@ -1,18 +1,19 @@
using HarmonyLib;
using rjw;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using RimWorld;
using Verse;
+
namespace RJW_Genes
{
-
+ ///
+ /// This Patch hooks after "SatisfyPersonal"(i.E. when the pawn finished fucking) and covers LifeForceGain.
+ /// If the pawn has LifeForce, all relevant Genes are checked and applied.
+ ///
[HarmonyPatch(typeof(SexUtility), nameof(SexUtility.SatisfyPersonal))]
- public static class Patch_LifeForce
+ public static class Patch_SatisfyPersonal_LifeForceGain
{
+ public const float LIFEFORCE_GAINED_FROM_DRAINER_GENE = 0.25f;
+
public static void Postfix(SexProps props)
{
// ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation)
@@ -28,23 +29,22 @@ namespace RJW_Genes
//Summary//
//We use the positions of the pawn (dom or sub) and based on that which interactions will transfer fertilin
//By checking isreceiver we know if the succubus is the dom or the sub and if the situation is reverse we also swap the function we use
- //
float absorb_factor = 0f;
if (GeneUtility.HasLifeForce(props.partner))
{
- Pawn succubus = props.partner;
+ Pawn PawnWithLifeForce = props.partner;
if (!props.isRevese)
{
if (props.isReceiver)
{
// Scenario Dom Succubus, normal
- absorb_factor = BaseDom(props, succubus);
+ absorb_factor = BaseDom(props, PawnWithLifeForce);
}
else
{
// Scenario Sub Succubus, normal
- absorb_factor = BaseSub(props, succubus);
+ absorb_factor = BaseSub(props, PawnWithLifeForce);
}
}
else
@@ -52,32 +52,40 @@ namespace RJW_Genes
if (props.isReceiver)
{
// Scenario Dom Succubus, Reverse
- absorb_factor = BaseSub(props, succubus);
+ absorb_factor = BaseSub(props, PawnWithLifeForce);
}
else
{
// Scenario Sub Succubus, Reverse
- absorb_factor = BaseDom(props, succubus);
+ absorb_factor = BaseDom(props, PawnWithLifeForce);
}
}
- //If we remove this check fertelin is always lost, but the succubus doesn't always gain any
+ // If we remove this check fertilin is always lost, but the succubus doesn't always gain any
if (absorb_factor != 0f)
{
TransferFertilin(props, absorb_factor);
}
- if (GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_drainer) && !props.pawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_succubus_drained))
+ // Handle Gene: Sexual_Drainer
+ // to be drained, a pawn must not-be-drained-already and drainers cannot be drained either.
+ if (GeneUtility.IsSexualDrainer(PawnWithLifeForce)
+ && !props.pawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_succubus_drained)
+ && !GeneUtility.IsSexualDrainer(props.pawn))
{
+ if (RJW_Genes_Settings.rjw_genes_detailed_debug)
+ ModLog.Message($"{props.pawn.Name} has been (sexually) drained by {PawnWithLifeForce.Name}");
props.pawn.health.AddHediff(HediffDefOf.rjw_genes_succubus_drained);
- GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(succubus), 0.25f);
+ GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(PawnWithLifeForce), LIFEFORCE_GAINED_FROM_DRAINER_GENE);
}
}
}
+
public static void TransferFertilin(SexProps props, float absorb_percentage = 1f)
{
Pawn_GeneTracker genes = props.partner.genes;
Gene_LifeForce gene = genes.GetFirstGeneOfType();
+
Hediff fertilin_lost = props.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.rjw_genes_fertilin_lost);
//Around quarter get ejected everytime pawn cums
float multiplier = Rand.Range(0.10f, 0.40f);
@@ -99,8 +107,15 @@ namespace RJW_Genes
multiplier *= absorb_percentage;
//Currently taking the sum of all penises, maybe I should just consider one at random
float valuechange = TotalFertilinAmount(props, multiplier);
+
+ if (props.partner.IsAnimal())
+ {
+ if (RJW_Genes_Settings.rjw_genes_detailed_debug)
+ ModLog.Message($"Fertilin-Source of {props.pawn.Name} was an Animal, Fertilin-Gain is being adjusted by {RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor}%");
+ valuechange *= RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor;
+ }
+
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(props.partner), valuechange);
- //gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.pawn) / 100 * absorb_factor * multiplier;
}
public static float TotalFertilinAmount(SexProps props, float multiplier)
@@ -120,39 +135,51 @@ namespace RJW_Genes
return total_fluid;
}
- public static float BaseDom(SexProps props, Pawn succubus)
+ ///
+ /// Handles the Case that the Life-Force wielder initiated the Sex (They are "Dom").
+ ///
+ /// The summary of the sex act, used for checking conditions.
+ /// The pawn that might gain LifeForce through this method.
+ /// A factor between 0 and 1 how much of output-fertilin will be used for input-lifeforce
+ public static float BaseDom(SexProps props, Pawn PawnWithLifeForce)
{
float absorb_factor = 0f;
- if (props.sexType == xxx.rjwSextype.Sixtynine && GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_cum_eater))
+ if (props.sexType == xxx.rjwSextype.Sixtynine && GeneUtility.IsCumEater(PawnWithLifeForce))
{
absorb_factor += 1f;
}
return absorb_factor;
}
- public static float BaseSub(SexProps props, Pawn succubus)
+ ///
+ /// Handles the Case that the Life-Force wielder got initiated into sex (They are "Sub").
+ ///
+ /// The summary of the sex act, used for checking conditions.
+ /// The pawn that might gain LifeForce through this method.
+ /// A factor between 0 and 1 how much of output-fertilin will be used for input-lifeforce
+ public static float BaseSub(SexProps props, Pawn PawnWithLifeForce)
{
float absorb_factor = 0f;
if ((props.sexType == xxx.rjwSextype.Oral || props.sexType == xxx.rjwSextype.Fellatio || props.sexType == xxx.rjwSextype.Sixtynine)
- && GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_cum_eater))
+ && GeneUtility.IsCumEater(PawnWithLifeForce))
{
absorb_factor += 1f;
}
- else if (props.sexType == xxx.rjwSextype.Vaginal && GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_vaginal_absorber))
+ else if (props.sexType == xxx.rjwSextype.Vaginal && GeneUtility.HasGeneNullCheck(PawnWithLifeForce, GeneDefOf.rjw_genes_vaginal_absorber))
{
absorb_factor += 1f;
}
- else if (props.sexType == xxx.rjwSextype.Anal && GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_anal_absorber))
+ else if (props.sexType == xxx.rjwSextype.Anal && GeneUtility.HasGeneNullCheck(PawnWithLifeForce, GeneDefOf.rjw_genes_anal_absorber))
{
absorb_factor += 1f;
}
else if (props.sexType == xxx.rjwSextype.DoublePenetration)
{
- if (GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_vaginal_absorber))
+ if (GeneUtility.HasGeneNullCheck(PawnWithLifeForce, GeneDefOf.rjw_genes_vaginal_absorber))
{
absorb_factor += 0.5f;
}
- if (GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_anal_absorber))
+ if (GeneUtility.HasGeneNullCheck(PawnWithLifeForce, GeneDefOf.rjw_genes_anal_absorber))
{
absorb_factor += 0.5f;
}
diff --git a/Source/Genes/Life_Force/Patches/Patch_SexTicks_ChangePsyfocus.cs b/Source/Genes/Life_Force/Patches/Patch_SexTicks_ChangePsyfocus.cs
new file mode 100644
index 0000000..dfc359b
--- /dev/null
+++ b/Source/Genes/Life_Force/Patches/Patch_SexTicks_ChangePsyfocus.cs
@@ -0,0 +1,62 @@
+using HarmonyLib;
+using rjw;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using RimWorld;
+using Verse;
+
+namespace RJW_Genes
+{
+
+ ///
+ /// This patch enables cum-eater pawns to drain cumflations for more fertilin drain by passively having sex.
+ /// It is hooked after RJWs Change-Psyfocus so that pawns that are having prolonged sex (e.g. by overdrive) can fully drain the cumflation over time.
+ ///
+ /// It is conditionally loaded only when LicentiaLabs is enabled, as this is the necessary source for cumflation-hediffs.
+ /// The patched function is: [HarmonyPatch(typeof(JobDriver_Sex), nameof(JobDriver_Sex.ChangePsyfocus))]
+ ///
+ public static class Patch_SexTicks_ChangePsyfocus
+ {
+ public const float LIFEFORCE_GAIN_PER_TICK = 0.05f;
+ public const float CUMFLATION_SEVERITY_LOSS_PER_TICK = 0.1f;
+
+ //Using ChangePsyfocus as it is something that fires every 60 ticks
+ public static void Postfix(ref JobDriver_Sex __instance, ref Pawn pawn, ref Thing target)
+ {
+ SexProps props = __instance.Sexprops;
+ if (props != null && props.sexType == xxx.rjwSextype.Cunnilingus && props.partner != null && target != null)
+ {
+ Pawn pawn2 = target as Pawn;
+ // Case 1: Pawn is "drinking" and has CumEater Gene
+ if (props.isRevese && GeneUtility.IsCumEater(pawn))
+ {
+ if (RJW_Genes_Settings.rjw_genes_detailed_debug)
+ ModLog.Message($"{pawn.Name} is draining {pawn2.Name}'s cumflation for additional fertilin (CumEater-Gene ChangePsyFocus-Trigger).");
+ DrinkCumflation(pawn2, pawn);
+ }
+ // Case 2: Pawn2 is "drinking" and has CumEater Gene
+ else if (GeneUtility.IsCumEater(pawn2))
+ {
+ if (RJW_Genes_Settings.rjw_genes_detailed_debug)
+ ModLog.Message($"{pawn.Name} is draining {pawn2.Name}'s cumflation for additional fertilin (CumEater-Gene ChangePsyFocus-Trigger).");
+ DrinkCumflation(pawn, pawn2);
+ }
+ }
+ }
+
+ public static void DrinkCumflation(Pawn source, Pawn consumer)
+ {
+ if (GeneUtility.HasLifeForce(consumer) && GeneUtility.IsCumEater(consumer)
+ && source.health.hediffSet.HasHediff(HediffDef.Named("Cumflation")))
+ {
+ Hediff cumflation = source.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("Cumflation"));
+ Gene_LifeForce gene_LifeForce = consumer.genes.GetFirstGeneOfType();
+ cumflation.Severity = Math.Max(0f,cumflation.Severity - CUMFLATION_SEVERITY_LOSS_PER_TICK);
+ gene_LifeForce.Resource.Value += LIFEFORCE_GAIN_PER_TICK;
+ }
+ }
+ }
+}
diff --git a/Source/Genes/Life_Force/Patches/Patch_Vanilla_Inheritance_Fertilin.cs b/Source/Genes/Life_Force/Patches/Patch_Vanilla_Inheritance_Fertilin.cs
new file mode 100644
index 0000000..6bb3c92
--- /dev/null
+++ b/Source/Genes/Life_Force/Patches/Patch_Vanilla_Inheritance_Fertilin.cs
@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HarmonyLib;
+using RimWorld;
+using Verse;
+
+namespace RJW_Genes
+{
+ ///
+ /// This Patch is applied to add a absorption gene for fertilin if it has none, but it does have the fertilin gene
+ /// First tries to get one from the parents else chooses one of them at random
+ /// the genes are determined and "simply added".
+ ///
+ /// This fixes the potential problem that Pawns could inherit Fertilin, but no gene to gain Fertilin.
+ ///
+ [HarmonyPatch(typeof(PregnancyUtility), "GetInheritedGeneSet", new Type[]
+ {
+ typeof(Pawn),
+ typeof(Pawn)
+ }
+ )]
+ public static class Patch_Vanilla_Inheritance_Fertilin
+ {
+ [HarmonyPostfix]
+ public static void InheritedGenes(Pawn father, Pawn mother, ref GeneSet __result)
+ {
+ //Also make a setting for this
+ if (__result.GenesListForReading.Contains(GeneDefOf.rjw_genes_lifeforce))
+ {
+ List babies_genes = __result.GenesListForReading;
+
+ //If there is no absorption gene get one from the parents, else a random one
+ if(!Has_Fertilin_Source_Gene(babies_genes))
+ {
+ if (RJW_Genes_Settings.rjw_genes_detailed_debug)
+ ModLog.Message($"Child of ({father.Name};{mother.Name}) has Genes with LifeForce-Resource but no Source-Gene, adding one of parents random if possible or any random otherwise.");
+ // Gather Parents Source-Genes
+ List absorption_genes_parents = new List();
+ foreach (GeneDef geneDef in FertilinSourceGenes)
+ {
+ if(mother.genes != null && mother.genes.HasGene(geneDef))
+ absorption_genes_parents.Add(geneDef);
+
+ if (father.genes != null && father.genes.HasGene(geneDef))
+ absorption_genes_parents.Add(geneDef);
+ }
+ // Parents had Genes - Pick a random one of them
+ if (!absorption_genes_parents.NullOrEmpty())
+ __result.AddGene(absorption_genes_parents.RandomElement());
+ // Create a fully random one for your little Cumfueled missbreed
+ else
+ __result.AddGene(FertilinSourceGenes.RandomElement());
+ }
+ }
+ }
+
+ private static List FertilinSourceGenes = new List() {
+ GeneDefOf.rjw_genes_drainer,
+ GeneDefOf.rjw_genes_cum_eater,
+ GeneDefOf.rjw_genes_vaginal_absorber,
+ GeneDefOf.rjw_genes_anal_absorber,
+ GeneDefOf.rjw_genes_cockeater
+ };
+
+ private static bool Has_Fertilin_Source_Gene(List genes)
+ {
+ foreach (GeneDef gene in genes)
+ {
+ if (FertilinSourceGenes.Contains(gene))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ }
+}
diff --git a/Source/Genes/Life_Force/ThinkNode_ConditionalCannotInteract.cs b/Source/Genes/Life_Force/ThinkNodes/ThinkNode_ConditionalCannotInteract.cs
similarity index 100%
rename from Source/Genes/Life_Force/ThinkNode_ConditionalCannotInteract.cs
rename to Source/Genes/Life_Force/ThinkNodes/ThinkNode_ConditionalCannotInteract.cs
diff --git a/Source/Genes/Life_Force/ThinkNode_ConditionalCritcalLifeForce.cs b/Source/Genes/Life_Force/ThinkNodes/ThinkNode_ConditionalCritcalLifeForce.cs
similarity index 100%
rename from Source/Genes/Life_Force/ThinkNode_ConditionalCritcalLifeForce.cs
rename to Source/Genes/Life_Force/ThinkNodes/ThinkNode_ConditionalCritcalLifeForce.cs
diff --git a/Source/Genes/Life_Force/ThinkNode_ConditionalLowLifeForce.cs b/Source/Genes/Life_Force/ThinkNodes/ThinkNode_ConditionalLowLifeForce.cs
similarity index 100%
rename from Source/Genes/Life_Force/ThinkNode_ConditionalLowLifeForce.cs
rename to Source/Genes/Life_Force/ThinkNodes/ThinkNode_ConditionalLowLifeForce.cs
diff --git a/Source/Genes/Life_Force/ThinkNode_NewFlirtTarget.cs b/Source/Genes/Life_Force/ThinkNodes/ThinkNode_NewFlirtTarget.cs
similarity index 100%
rename from Source/Genes/Life_Force/ThinkNode_NewFlirtTarget.cs
rename to Source/Genes/Life_Force/ThinkNodes/ThinkNode_NewFlirtTarget.cs
diff --git a/Source/Genes/Life_Force/Alert_LowFertilin.cs b/Source/Genes/Life_Force/UI/Alert_LowFertilin.cs
similarity index 100%
rename from Source/Genes/Life_Force/Alert_LowFertilin.cs
rename to Source/Genes/Life_Force/UI/Alert_LowFertilin.cs
diff --git a/Source/Genes/Life_Force/GeneGizmo_ResourceLifeForce.cs b/Source/Genes/Life_Force/UI/GeneGizmo_ResourceLifeForce.cs
similarity index 100%
rename from Source/Genes/Life_Force/GeneGizmo_ResourceLifeForce.cs
rename to Source/Genes/Life_Force/UI/GeneGizmo_ResourceLifeForce.cs
diff --git a/Source/Genes/Special/Patch_OrgasmRush.cs b/Source/Genes/Special/Patch_OrgasmRush.cs
index 3caaa68..eaf6216 100644
--- a/Source/Genes/Special/Patch_OrgasmRush.cs
+++ b/Source/Genes/Special/Patch_OrgasmRush.cs
@@ -19,8 +19,12 @@ namespace RJW_Genes
public static void Postfix(SexProps props)
{
- // ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation)
- if (props.pawn == null || !props.hasPartner())
+ // ShortCuts: Exit Early if Pawn or Partner are null (can happen with Masturbation or other nieche-cases)
+ if (props == null || props.pawn == null || !props.hasPartner())
+ return;
+
+ // Exit for Animals - Animals can't get or trigger Orgasm Rushes. Fixes #15
+ if (props.pawn.IsAnimal() || props.partner.IsAnimal())
return;
if (props.pawn.genes != null && props.pawn.genes.HasGene(GeneDefOf.rjw_genes_orgasm_rush))
diff --git a/Source/HarmonyInit.cs b/Source/HarmonyInit.cs
index 8c5f3d6..b0f8295 100644
--- a/Source/HarmonyInit.cs
+++ b/Source/HarmonyInit.cs
@@ -27,6 +27,7 @@ namespace RJW_Genes
// Gene: Generous Donor [Postfix Patch]
harmony.Patch(AccessTools.Method(typeof(LicentiaLabs.CumflationHelper), nameof(LicentiaLabs.CumflationHelper.TransferNutrition)),
postfix: new HarmonyMethod(typeof(Patch_TransferNutrition), nameof(Patch_TransferNutrition.Postfix)));
+ // Gene: CumEater [Postfix Patch]
harmony.Patch(AccessTools.Method(typeof(rjw.JobDriver_Sex), nameof(rjw.JobDriver_Sex.ChangePsyfocus)),
postfix: new HarmonyMethod(typeof(Patch_SexTicks_ChangePsyfocus), nameof(Patch_SexTicks_ChangePsyfocus.Postfix)));
}
diff --git a/Source/Interactions/CompAbility_SexInteractionRequirements.cs b/Source/Interactions/SuccubusTailjob/CompAbility_SexInteractionRequirements.cs
similarity index 100%
rename from Source/Interactions/CompAbility_SexInteractionRequirements.cs
rename to Source/Interactions/SuccubusTailjob/CompAbility_SexInteractionRequirements.cs
diff --git a/Source/Interactions/CompProperties_SexInteractionRequirements.cs b/Source/Interactions/SuccubusTailjob/CompProperties_SexInteractionRequirements.cs
similarity index 100%
rename from Source/Interactions/CompProperties_SexInteractionRequirements.cs
rename to Source/Interactions/SuccubusTailjob/CompProperties_SexInteractionRequirements.cs
diff --git a/Source/Interactions/CustomSexInteraction_Helper.cs b/Source/Interactions/SuccubusTailjob/CustomSexInteraction_Helper.cs
similarity index 100%
rename from Source/Interactions/CustomSexInteraction_Helper.cs
rename to Source/Interactions/SuccubusTailjob/CustomSexInteraction_Helper.cs
diff --git a/Source/Interactions/DomSuccubusTailCustomRequirementHandler.cs b/Source/Interactions/SuccubusTailjob/DomSuccubusTailCustomRequirementHandler.cs
similarity index 100%
rename from Source/Interactions/DomSuccubusTailCustomRequirementHandler.cs
rename to Source/Interactions/SuccubusTailjob/DomSuccubusTailCustomRequirementHandler.cs
diff --git a/Source/Interactions/GenesPartKindUsageRule.cs b/Source/Interactions/SuccubusTailjob/GenesPartKindUsageRule.cs
similarity index 100%
rename from Source/Interactions/GenesPartKindUsageRule.cs
rename to Source/Interactions/SuccubusTailjob/GenesPartKindUsageRule.cs
diff --git a/Source/Interactions/SubSuccubusTailCustomRequirementHandler.cs b/Source/Interactions/SuccubusTailjob/SubSuccubusTailCustomRequirementHandler.cs
similarity index 100%
rename from Source/Interactions/SubSuccubusTailCustomRequirementHandler.cs
rename to Source/Interactions/SuccubusTailjob/SubSuccubusTailCustomRequirementHandler.cs
diff --git a/Source/Rjw-Genes.csproj b/Source/Rjw-Genes.csproj
index f4ab208..026661f 100644
--- a/Source/Rjw-Genes.csproj
+++ b/Source/Rjw-Genes.csproj
@@ -65,14 +65,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -121,60 +121,62 @@
-
+
-
+
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
+
+
+
+
+
+
diff --git a/Source/Settings/RJW_Genes_Settings.cs b/Source/Settings/RJW_Genes_Settings.cs
new file mode 100644
index 0000000..ba1d69a
--- /dev/null
+++ b/Source/Settings/RJW_Genes_Settings.cs
@@ -0,0 +1,38 @@
+using System;
+using Verse;
+using UnityEngine;
+
+namespace RJW_Genes
+{
+ public class RJW_Genes_Settings : ModSettings
+ {
+ public static void DoWindowContents(Rect inRect)
+ {
+ //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);
+ listing_Standard.Label("Fertlin-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("detailed-debug", ref rjw_genes_detailed_debug, "Adds detailed information to the log about interactions and genes.", 0f, 1f);
+ listing_Standard.End();
+ }
+
+ public override void ExposeData()
+ {
+ base.ExposeData();
+ Scribe_Values.Look(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(ref RJW_Genes_Settings.rjw_genes_detailed_debug, "rjw_genes_detailed_debug", RJW_Genes_Settings.rjw_genes_detailed_debug, true);
+ }
+
+ public static bool rjw_genes_detailed_debug = false;
+ public static float rjw_genes_fertilin_from_animals_factor = 0.1f;
+ }
+}
diff --git a/Source/Settings/RJW_Genes_SettingsController.cs b/Source/Settings/RJW_Genes_SettingsController.cs
new file mode 100644
index 0000000..7236b14
--- /dev/null
+++ b/Source/Settings/RJW_Genes_SettingsController.cs
@@ -0,0 +1,22 @@
+using Verse;
+using UnityEngine;
+
+namespace RJW_Genes
+{
+ public class RJW_Genes_SettingsController : Mod
+ {
+ public RJW_Genes_SettingsController(ModContentPack content) : base(content)
+ {
+ base.GetSettings();
+ }
+
+ public override string SettingsCategory()
+ {
+ return "RJW Genes - General";
+ }
+ public override void DoSettingsWindowContents(Rect inRect)
+ {
+ RJW_Genes_Settings.DoWindowContents(inRect);
+ }
+ }
+}