diff --git a/Defs/ThoughtDefs/Thoughts_ate.xml b/Defs/ThoughtDefs/Thoughts_ate.xml
index 9bbec73..0bbeb15 100644
--- a/Defs/ThoughtDefs/Thoughts_ate.xml
+++ b/Defs/ThoughtDefs/Thoughts_ate.xml
@@ -1,18 +1,12 @@
-
+
AteCum
0.5
1
0.4
- NumofEatenCum
RJWSexperience.Thought_AteCum
-
- 10
- 60
- 120
-
@@ -35,7 +29,16 @@
3
-
-
-
+
+
+ NumofEatenCum
+
+ 0
+ 10
+ 60
+ 120
+
+
+
+
diff --git a/RJWSexperience/RJWSexperience/Thoughts/ThoughtDefExtension_IncreaseRecord.cs b/RJWSexperience/RJWSexperience/Thoughts/ThoughtDefExtension_IncreaseRecord.cs
new file mode 100644
index 0000000..29c2d6d
--- /dev/null
+++ b/RJWSexperience/RJWSexperience/Thoughts/ThoughtDefExtension_IncreaseRecord.cs
@@ -0,0 +1,14 @@
+using RimWorld;
+using System.Diagnostics.CodeAnalysis;
+using Verse;
+
+namespace RJWSexperience
+{
+ public class ThoughtDefExtension_IncreaseRecord : DefModExtension
+ {
+ [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
+ public RecordDef recordDef;
+ [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
+ public float increment;
+ }
+}
diff --git a/RJWSexperience/RJWSexperience/Thoughts/ThoughtDef_Opinionbased.cs b/RJWSexperience/RJWSexperience/Thoughts/ThoughtDefExtension_StageFromOpinion.cs
similarity index 62%
rename from RJWSexperience/RJWSexperience/Thoughts/ThoughtDef_Opinionbased.cs
rename to RJWSexperience/RJWSexperience/Thoughts/ThoughtDefExtension_StageFromOpinion.cs
index 6283437..30252c9 100644
--- a/RJWSexperience/RJWSexperience/Thoughts/ThoughtDef_Opinionbased.cs
+++ b/RJWSexperience/RJWSexperience/Thoughts/ThoughtDefExtension_StageFromOpinion.cs
@@ -1,13 +1,10 @@
-using RimWorld;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
+using Verse;
namespace RJWSexperience
{
- ///
- /// ThoughtDef using opinion
- ///
- public class ThoughtDef_Opinionbased : ThoughtDef
+ public class ThoughtDefExtension_StageFromOpinion : DefModExtension
{
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public List minimumValueforStage = new List();
diff --git a/RJWSexperience/RJWSexperience/Thoughts/ThoughtDef_Recordbased.cs b/RJWSexperience/RJWSexperience/Thoughts/ThoughtDefExtension_StageFromRecord.cs
similarity index 64%
rename from RJWSexperience/RJWSexperience/Thoughts/ThoughtDef_Recordbased.cs
rename to RJWSexperience/RJWSexperience/Thoughts/ThoughtDefExtension_StageFromRecord.cs
index b4702ad..6ff0001 100644
--- a/RJWSexperience/RJWSexperience/Thoughts/ThoughtDef_Recordbased.cs
+++ b/RJWSexperience/RJWSexperience/Thoughts/ThoughtDefExtension_StageFromRecord.cs
@@ -1,19 +1,15 @@
using RimWorld;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
+using Verse;
namespace RJWSexperience
{
- ///
- /// ThoughtDef using record
- ///
- public class ThoughtDef_Recordbased : ThoughtDef
+ public class ThoughtDefExtension_StageFromRecord : DefModExtension
{
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public RecordDef recordDef;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public List minimumValueforStage = new List();
- [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
- public float increment;
}
}
diff --git a/RJWSexperience/RJWSexperience/Thoughts/Thought_IncreaseRecord.cs b/RJWSexperience/RJWSexperience/Thoughts/Thought_IncreaseRecord.cs
index b5f59c4..0673802 100644
--- a/RJWSexperience/RJWSexperience/Thoughts/Thought_IncreaseRecord.cs
+++ b/RJWSexperience/RJWSexperience/Thoughts/Thought_IncreaseRecord.cs
@@ -3,8 +3,23 @@ using Verse;
namespace RJWSexperience
{
- public class Thought_IncreaseRecord : Thought_Recordbased
+ public class Thought_IncreaseRecord : Thought_Memory
{
+ private ThoughtDefExtension_IncreaseRecord extension;
+
+ protected ThoughtDefExtension_IncreaseRecord Extension
+ {
+ get
+ {
+ if (extension == null)
+ extension = def.GetModExtension();
+ return extension;
+ }
+ }
+
+ protected RecordDef RecordDef => Extension.recordDef;
+ protected float Increment => Extension.increment;
+
protected float recordIncrement;
public override void ExposeData()
@@ -21,7 +36,6 @@ namespace RJWSexperience
pawn.records.AddTo(RecordDef, recordIncrement);
recordIncrement = 0;
}
-
}
public override bool TryMergeWithExistingMemory(out bool showBubble)
@@ -46,6 +60,7 @@ namespace RJWSexperience
base.Init();
recordIncrement = Increment;
}
+
protected virtual void Merged()
{
age = 0;
diff --git a/RJWSexperience/RJWSexperience/Thoughts/Thought_Opinionbased.cs b/RJWSexperience/RJWSexperience/Thoughts/Thought_Opinionbased.cs
index afa06aa..5942319 100644
--- a/RJWSexperience/RJWSexperience/Thoughts/Thought_Opinionbased.cs
+++ b/RJWSexperience/RJWSexperience/Thoughts/Thought_Opinionbased.cs
@@ -8,8 +8,19 @@ namespace RJWSexperience
///
public class Thought_Opinionbased : Thought_Memory
{
- protected ThoughtDef_Opinionbased Def => (ThoughtDef_Opinionbased)def;
- protected List MinimumValueforStage => Def.minimumValueforStage;
+ private ThoughtDefExtension_StageFromOpinion extension;
+
+ protected ThoughtDefExtension_StageFromOpinion Extension
+ {
+ get
+ {
+ if (extension == null)
+ extension = def.GetModExtension();
+ return extension;
+ }
+ }
+
+ protected List MinimumValueforStage => Extension.minimumValueforStage;
public override int CurStageIndex
{
diff --git a/RJWSexperience/RJWSexperience/Thoughts/Thought_Recordbased.cs b/RJWSexperience/RJWSexperience/Thoughts/Thought_Recordbased.cs
index d7ccd37..48dc19a 100644
--- a/RJWSexperience/RJWSexperience/Thoughts/Thought_Recordbased.cs
+++ b/RJWSexperience/RJWSexperience/Thoughts/Thought_Recordbased.cs
@@ -8,10 +8,20 @@ namespace RJWSexperience
///
public class Thought_Recordbased : Thought_Memory
{
- protected ThoughtDef_Recordbased Def => (ThoughtDef_Recordbased)def;
- protected RecordDef RecordDef => Def.recordDef;
- protected List MinimumValueforStage => Def.minimumValueforStage;
- protected float Increment => Def.increment;
+ private ThoughtDefExtension_StageFromRecord extension;
+
+ protected ThoughtDefExtension_StageFromRecord Extension
+ {
+ get
+ {
+ if (extension == null)
+ extension = def.GetModExtension();
+ return extension;
+ }
+ }
+
+ protected RecordDef RecordDef => Extension.recordDef;
+ protected List MinimumValueforStage => Extension.minimumValueforStage;
public override int CurStageIndex
{
@@ -20,7 +30,7 @@ namespace RJWSexperience
float value = pawn?.records?.GetValue(RecordDef) ?? 0f;
for (int i = MinimumValueforStage.Count - 1; i > 0; i--)
{
- if (MinimumValueforStage[i] < value) return i + 1;
+ if (MinimumValueforStage[i] < value) return i;
}
return 0;
}
diff --git a/RJWSexperience/RJWSexperience/VariousDefOf.cs b/RJWSexperience/RJWSexperience/VariousDefOf.cs
index 48730bc..d57908e 100644
--- a/RJWSexperience/RJWSexperience/VariousDefOf.cs
+++ b/RJWSexperience/RJWSexperience/VariousDefOf.cs
@@ -1,78 +1,74 @@
-using System;
-using System.Collections.Generic;
+using RimWorld;
using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using Verse;
-using RimWorld;
namespace RJWSexperience
{
- public static class VariousDefOf
- {
- public static readonly RecordDef NumofEatenCum = DefDatabase.GetNamed("NumofEatenCum");
- public static readonly RecordDef AmountofEatenCum = DefDatabase.GetNamed("AmountofEatenCum");
- public static readonly RecordDef Lust = DefDatabase.GetNamed("Lust");
- public static readonly RecordDef VaginalSexCount = DefDatabase.GetNamed("VaginalSexCount");
- public static readonly RecordDef AnalSexCount = DefDatabase.GetNamed("AnalSexCount");
- public static readonly RecordDef OralSexCount = DefDatabase.GetNamed("OralSexCount");
- public static readonly RecordDef BlowjobCount = DefDatabase.GetNamed("BlowjobCount");
- public static readonly RecordDef CunnilingusCount = DefDatabase.GetNamed("CunnilingusCount");
- public static readonly RecordDef GenitalCaressCount = DefDatabase.GetNamed("GenitalCaressCount");
- public static readonly RecordDef HandjobCount = DefDatabase.GetNamed("HandjobCount");
- public static readonly RecordDef FingeringCount = DefDatabase.GetNamed("FingeringCount");
- public static readonly RecordDef FootjobCount = DefDatabase.GetNamed("FootjobCount");
- public static readonly RecordDef MiscSexualBehaviorCount = DefDatabase.GetNamed("MiscSexualBehaviorCount");
- public static readonly RecordDef SexPartnerCount = DefDatabase.GetNamed("SexPartnerCount");
- public static readonly RecordDef OrgasmCount = DefDatabase.GetNamed("OrgasmCount");
- public static readonly SkillDef SexSkill = DefDatabase.GetNamed("Sex");
- public static readonly ThoughtDef_Recordbased AteCum = DefDatabase.GetNamed("AteCum");
- public static readonly PawnRelationDef Bastard = DefDatabase.GetNamed("Bastard");
- public static readonly ThingDef GatheredCum = DefDatabase.GetNamed("GatheredCum");
- public static readonly ThingDef FilthCum = ThingDef.Named("FilthCum");
- public static readonly ThingDef FilthGirlcum = ThingDef.Named("FilthGirlCum");
- public static readonly HediffDef CumAddiction = DefDatabase.GetNamed("CumAddiction");
- public static readonly HediffDef CumTolerance = DefDatabase.GetNamed("CumTolerance");
- public static readonly ChemicalDef Cum = DefDatabase.GetNamed("Cum");
- public static readonly NeedDef Chemical_Cum = DefDatabase.GetNamed("Chemical_Cum");
- public static readonly TraitDef Virgin = DefDatabase.GetNamed("Virgin");
- public static readonly JobDef CleanSelfwithBucket = DefDatabase.GetNamed("CleanSelfwithBucket");
- public static readonly PawnRelationDef relation_birthgiver = DefDatabase.GetNamed("RJW_Sire");
- public static readonly PawnRelationDef relation_spawn = DefDatabase.GetNamed("RJW_Pup");
- public static readonly KeyBindingDef OpenSexStatistics = DefDatabase.GetNamed("OpenSexStatistics");
+ public static class VariousDefOf
+ {
+ public static readonly RecordDef NumofEatenCum = DefDatabase.GetNamed("NumofEatenCum");
+ public static readonly RecordDef AmountofEatenCum = DefDatabase.GetNamed("AmountofEatenCum");
+ public static readonly RecordDef Lust = DefDatabase.GetNamed("Lust");
+ public static readonly RecordDef VaginalSexCount = DefDatabase.GetNamed("VaginalSexCount");
+ public static readonly RecordDef AnalSexCount = DefDatabase.GetNamed("AnalSexCount");
+ public static readonly RecordDef OralSexCount = DefDatabase.GetNamed("OralSexCount");
+ public static readonly RecordDef BlowjobCount = DefDatabase.GetNamed("BlowjobCount");
+ public static readonly RecordDef CunnilingusCount = DefDatabase.GetNamed("CunnilingusCount");
+ public static readonly RecordDef GenitalCaressCount = DefDatabase.GetNamed("GenitalCaressCount");
+ public static readonly RecordDef HandjobCount = DefDatabase.GetNamed("HandjobCount");
+ public static readonly RecordDef FingeringCount = DefDatabase.GetNamed("FingeringCount");
+ public static readonly RecordDef FootjobCount = DefDatabase.GetNamed("FootjobCount");
+ public static readonly RecordDef MiscSexualBehaviorCount = DefDatabase.GetNamed("MiscSexualBehaviorCount");
+ public static readonly RecordDef SexPartnerCount = DefDatabase.GetNamed("SexPartnerCount");
+ public static readonly RecordDef OrgasmCount = DefDatabase.GetNamed("OrgasmCount");
+ public static readonly SkillDef SexSkill = DefDatabase.GetNamed("Sex");
+ public static readonly ThoughtDef AteCum = DefDatabase.GetNamed("AteCum");
+ public static readonly PawnRelationDef Bastard = DefDatabase.GetNamed("Bastard");
+ public static readonly ThingDef GatheredCum = DefDatabase.GetNamed("GatheredCum");
+ public static readonly ThingDef FilthCum = ThingDef.Named("FilthCum");
+ public static readonly ThingDef FilthGirlcum = ThingDef.Named("FilthGirlCum");
+ public static readonly HediffDef CumAddiction = DefDatabase.GetNamed("CumAddiction");
+ public static readonly HediffDef CumTolerance = DefDatabase.GetNamed("CumTolerance");
+ public static readonly ChemicalDef Cum = DefDatabase.GetNamed("Cum");
+ public static readonly NeedDef Chemical_Cum = DefDatabase.GetNamed("Chemical_Cum");
+ public static readonly TraitDef Virgin = DefDatabase.GetNamed("Virgin");
+ public static readonly JobDef CleanSelfwithBucket = DefDatabase.GetNamed("CleanSelfwithBucket");
+ public static readonly PawnRelationDef relation_birthgiver = DefDatabase.GetNamed("RJW_Sire");
+ public static readonly PawnRelationDef relation_spawn = DefDatabase.GetNamed("RJW_Pup");
+ public static readonly KeyBindingDef OpenSexStatistics = DefDatabase.GetNamed("OpenSexStatistics");
- public static float CumneedLevelOffset
- {
- get
- {
- if (cumneedLevelOffsetcache == null)
- {
- CreateCumCompCache();
- }
- return cumneedLevelOffsetcache ?? 1.0f;
- }
- }
- public static float CumexistingAddictionSeverityOffset
- {
- get
- {
- if (cumexistingAddictionSeverityOffsetcache == null)
- {
- CreateCumCompCache();
- }
- return cumexistingAddictionSeverityOffsetcache ?? 1.0f;
- }
- }
+ public static float CumneedLevelOffset
+ {
+ get
+ {
+ if (cumneedLevelOffsetcache == null)
+ {
+ CreateCumCompCache();
+ }
+ return cumneedLevelOffsetcache ?? 1.0f;
+ }
+ }
- private static void CreateCumCompCache()
- {
- CompProperties_Drug comp = (CompProperties_Drug)GatheredCum.comps.FirstOrDefault(x => x is CompProperties_Drug);
- cumneedLevelOffsetcache = comp.needLevelOffset;
- cumexistingAddictionSeverityOffsetcache = comp.existingAddictionSeverityOffset;
- }
+ public static float CumexistingAddictionSeverityOffset
+ {
+ get
+ {
+ if (cumexistingAddictionSeverityOffsetcache == null)
+ {
+ CreateCumCompCache();
+ }
+ return cumexistingAddictionSeverityOffsetcache ?? 1.0f;
+ }
+ }
+ private static void CreateCumCompCache()
+ {
+ CompProperties_Drug comp = (CompProperties_Drug)GatheredCum.comps.FirstOrDefault(x => x is CompProperties_Drug);
+ cumneedLevelOffsetcache = comp.needLevelOffset;
+ cumexistingAddictionSeverityOffsetcache = comp.existingAddictionSeverityOffset;
+ }
- private static float? cumneedLevelOffsetcache = null;
- private static float? cumexistingAddictionSeverityOffsetcache = null;
- }
+ private static float? cumneedLevelOffsetcache = null;
+ private static float? cumexistingAddictionSeverityOffsetcache = null;
+ }
}
diff --git a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Sex.xml b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Sex.xml
index cbe18a9..dfc8d33 100644
--- a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Sex.xml
+++ b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Sex.xml
@@ -236,13 +236,11 @@
-
+
Sex_Promiscuous
1
1
RJWSexperience.Thought_IncreaseRecord
- Lust
- 3.0
@@ -250,7 +248,13 @@
5
-
+
+
+ Lust
+ 3.0
+
+
+
Sex_NonPromiscuous
diff --git a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Submissive.xml b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Submissive.xml
index 0d3b79a..c9a8e2f 100644
--- a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Submissive.xml
+++ b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Submissive.xml
@@ -150,7 +150,7 @@
-
+
BeenRaped_Submissive
10
100
@@ -166,9 +166,9 @@
-3
-
+
-
+
BeenRaped_NotSubmissive
15
100
@@ -185,7 +185,7 @@
-200
-
+
Raped_Know_NotBeingSubmissive
diff --git a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Virginity.xml b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Virginity.xml
index 2d38c04..0b93ed2 100644
--- a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Virginity.xml
+++ b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Virginity.xml
@@ -258,17 +258,11 @@
-
+
Virgin_Precious_Taken
RJWSexperience.Thought_Opinionbased
7
1
-
- -100
- -50
- 0
- 75
-
@@ -291,18 +285,23 @@
5
-
+
+
+
+ -100
+ -50
+ 0
+ 75
+
+
+
+
-
+
Virgin_Shameful_Taken
RJWSexperience.Thought_Opinionbased
7
1
-
- -100
- 0
- 75
-
@@ -320,7 +319,16 @@
20
-
+
+
+
+ -100
+ 0
+ 75
+
+
+
+