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 @@ - Virgin_TakenF + RSI_VirginTaken + +
  • + +
  • + + +
  • Spouse
  • + + + RSI_VirginTakenNotSpouse + + + +
    - Virgin_TakenM - + RSI_TookVirgin + - Virgin_TookF - + RSI_VirginStolen + - Virgin_TookM - + RSI_VirginTakenNotSpouse + @@ -67,19 +81,18 @@ 1000 80 -
  • - Virgin_TakenF +
  • + RSI_VirginStolen Virgin_Precious_Taken_Forcefully - BeenRaped + Female
  • -
  • - Virgin_TakenF +
  • + RSI_VirginTaken Virgin_Precious_Taken - BeenRaped - true + Female
  • -
  • - Virgin_TookF +
  • + RSI_TookVirgin TookVirginity
  • @@ -95,19 +108,18 @@ 1000 1 -
  • - Virgin_TakenM +
  • + RSI_VirginStolen Virgin_Precious_Taken_Forcefully - BeenRaped + Male
  • -
  • - Virgin_TakenM +
  • + RSI_VirginTaken Virgin_Precious_Taken - BeenRaped - true + Male
  • -
  • - Virgin_TookM +
  • + RSI_TookVirgin TookVirginity
  • @@ -132,24 +144,23 @@
  • MaleSupremacy
  • -
  • - Virgin_TakenF +
  • + RSI_VirginStolen Virgin_Precious_Taken_Forcefully - BeenRaped + Female
  • -
  • - Virgin_TakenF +
  • + RSI_VirginTaken Virgin_Precious_Taken - BeenRaped - true + Female
  • -
  • - Virgin_TakenF +
  • + RSI_VirginTakenNotSpouse Virgin_OnlyForSpouse_Know_Taken - Female, NotSpouse + Female
  • - Virgin_TookF + RSI_TookVirgin TookVirginity
  • @@ -174,24 +185,23 @@
  • FemaleSupremacy
  • -
  • - Virgin_TakenM +
  • + RSI_VirginStolen Virgin_Precious_Taken_Forcefully - BeenRaped + Male
  • -
  • - Virgin_TakenM +
  • + RSI_VirginTaken Virgin_Precious_Taken - BeenRaped - true + Male
  • -
  • - Virgin_TakenM +
  • + RSI_VirginTakenNotSpouse Virgin_OnlyForSpouse_Know_Taken - Male, NotSpouse + Male
  • - Virgin_TookM + RSI_TookVirgin TookVirginity
  • @@ -210,11 +220,10 @@
  • FemaleSupremacy
  • -
  • - Virgin_TakenF +
  • + RSI_VirginTaken Virgin_Shameful_Taken - BeenRaped - true + Female
  • @@ -232,11 +241,10 @@
  • MaleSupremacy
  • -
  • - Virgin_TakenM +
  • + RSI_VirginTaken Virgin_Shameful_Taken - BeenRaped - true + Male
  • @@ -250,8 +258,8 @@ 1
  • - - I lost my virginity forcefully. + + My virginity was taken forcefully. -10 -200
  • @@ -265,17 +273,17 @@ 1
  • - + I am no longer virgin. -5
  • - + I am no longer virgin. -3
  • - + I am no longer virgin. -1
  • @@ -304,17 +312,17 @@ 1
  • - + Finally! 5
  • - + Finally! 10
  • - + Finally! 20