diff --git a/RJWSexperience/IdeologyAddon/Harmony.cs b/RJWSexperience/IdeologyAddon/Harmony.cs
index c6939f2..08a78d0 100644
--- a/RJWSexperience/IdeologyAddon/Harmony.cs
+++ b/RJWSexperience/IdeologyAddon/Harmony.cs
@@ -15,9 +15,9 @@ namespace RJWSexperience.Ideology
if (ModLister.HasActiveModWithName("RJW Sexperience"))
{
- harmony.Patch(AccessTools.Method("RJWSexperience.RJWUtility:ThrowVirginHIstoryEvent"),
+ harmony.Patch(AccessTools.Method("RJWSexperience.RJWUtility:ThrowVirginHistoryEvent"),
prefix: null,
- postfix: new HarmonyMethod(typeof(Sexperience_Patch_ThrowVirginHIstoryEvent), nameof(Sexperience_Patch_ThrowVirginHIstoryEvent.Postfix))
+ postfix: new HarmonyMethod(typeof(Sexperience_Patch_ThrowVirginHistoryEvent), nameof(Sexperience_Patch_ThrowVirginHistoryEvent.Postfix))
);
}
}
diff --git a/RJWSexperience/IdeologyAddon/Ideology/Patches/Sexperience_Patch.cs b/RJWSexperience/IdeologyAddon/Ideology/Patches/Sexperience_Patch.cs
index ccc98dc..9f2389d 100644
--- a/RJWSexperience/IdeologyAddon/Ideology/Patches/Sexperience_Patch.cs
+++ b/RJWSexperience/IdeologyAddon/Ideology/Patches/Sexperience_Patch.cs
@@ -1,34 +1,21 @@
-using RimWorld;
-using rjw;
-using RJWSexperience.Ideology.HistoryEvents;
+using rjw;
using Verse;
namespace RJWSexperience.Ideology.Patches
{
- public static class Sexperience_Patch_ThrowVirginHIstoryEvent
+ public static class Sexperience_Patch_ThrowVirginHistoryEvent
{
- public static void Postfix(Pawn pawn, Pawn partner, SexProps props, int degree)
+ public static void Postfix(Pawn exVirgin, Pawn partner, SexProps props, int degree)
{
- string tag = "";
- if (props.isRape && pawn != props.pawn)
- {
- tag += Tag.BeenRaped;
- }
- if (!pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, partner))
- {
- tag += Tag.NotSpouse;
- }
+ const int femaleAfterSurgery = 1;
- if (pawn.gender == Gender.Male)
- {
- if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenM.CreateTaggedEvent(pawn, tag + Tag.Gender(pawn), partner));
- Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookM.CreateTaggedEvent(partner, tag + Tag.Gender(pawn), pawn));
- }
- else
- {
- if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenF.CreateTaggedEvent(pawn, tag + Tag.Gender(pawn), partner));
- Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookF.CreateTaggedEvent(partner, tag + Tag.Gender(pawn), pawn));
- }
+ if (props.isRape && exVirgin == props.partner)
+ VariousDefOf.RSI_VirginStolen.RecordEventWithPartner(exVirgin, partner);
+
+ if (degree != femaleAfterSurgery)
+ VariousDefOf.RSI_VirginTaken.RecordEventWithPartner(exVirgin, partner);
+
+ VariousDefOf.RSI_TookVirgin.RecordEventWithPartner(partner, exVirgin);
}
}
}
diff --git a/RJWSexperience/IdeologyAddon/VariousDefOf.cs b/RJWSexperience/IdeologyAddon/VariousDefOf.cs
index 9703bd3..fc1dfa7 100644
--- a/RJWSexperience/IdeologyAddon/VariousDefOf.cs
+++ b/RJWSexperience/IdeologyAddon/VariousDefOf.cs
@@ -24,10 +24,9 @@ namespace RJWSexperience.Ideology
[MayRequireIdeology] public static readonly HistoryEventDef RSI_NonIncestuosMarriage;
[MayRequireIdeology] public static readonly HistoryEventDef RSI_NonIncestuosSex;
[MayRequireIdeology] public static readonly HistoryEventDef SexWithCorpse;
- [MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenF;
- [MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenM;
- [MayRequireIdeology] public static readonly HistoryEventDef Virgin_TookF;
- [MayRequireIdeology] public static readonly HistoryEventDef Virgin_TookM;
+ [MayRequireIdeology] public static readonly HistoryEventDef RSI_VirginTaken;
+ [MayRequireIdeology] public static readonly HistoryEventDef RSI_VirginStolen;
+ [MayRequireIdeology] public static readonly HistoryEventDef RSI_TookVirgin;
[MayRequireIdeology] public static readonly PreceptDef Bestiality_OnlyVenerated;
[MayRequireIdeology] public static readonly PreceptDef BabyFaction_AlwaysFather;
[MayRequireIdeology] public static readonly PreceptDef BabyFaction_AlwaysColony;
diff --git a/RJWSexperience/RJWSexperience/ExtensionMethods/PawnExtensions.cs b/RJWSexperience/RJWSexperience/ExtensionMethods/PawnExtensions.cs
index 21d2603..f56147f 100644
--- a/RJWSexperience/RJWSexperience/ExtensionMethods/PawnExtensions.cs
+++ b/RJWSexperience/RJWSexperience/ExtensionMethods/PawnExtensions.cs
@@ -91,7 +91,7 @@ namespace RJWSexperience
}
if (removedDegree != null)
- RJWUtility.ThrowVirginHIstoryEvent(pawn, partner, props, (int)removedDegree);
+ RJWUtility.ThrowVirginHistoryEvent(pawn, partner, props, (int)removedDegree);
}
}
}
diff --git a/RJWSexperience/RJWSexperience/RJWUtility.cs b/RJWSexperience/RJWSexperience/RJWUtility.cs
index f15cbeb..3b73b71 100644
--- a/RJWSexperience/RJWSexperience/RJWUtility.cs
+++ b/RJWSexperience/RJWSexperience/RJWUtility.cs
@@ -15,12 +15,12 @@ namespace RJWSexperience
/// For ideo patch
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancy", "RCS1163:Unused parameter.", Justification = "All parameters are needed for the ideology patch")]
- public static void ThrowVirginHIstoryEvent(Pawn pawn, Pawn partner, SexProps props, int degree)
+ public static void ThrowVirginHistoryEvent(Pawn exVirgin, Pawn partner, SexProps props, int degree)
{
//for non-ideo
if (partner.Ideo == null)
{
- partner.needs?.mood?.thoughts?.memories.TryGainMemory(xxx.took_virginity, pawn);
+ partner.needs?.mood?.thoughts?.memories.TryGainMemory(xxx.took_virginity, exVirgin);
}
}
diff --git a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Virginity.xml b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Virginity.xml
index b4b3c39..9085cd2 100644
--- a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Virginity.xml
+++ b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Virginity.xml
@@ -14,23 +14,37 @@