diff --git a/1.3/Assemblies/RJWSexperience.Ideology.dll b/1.3/Assemblies/RJWSexperience.Ideology.dll
index 3ada764..70baec9 100644
Binary files a/1.3/Assemblies/RJWSexperience.Ideology.dll and b/1.3/Assemblies/RJWSexperience.Ideology.dll differ
diff --git a/1.3/Defs/PreceptDefs/Precepts_SexProselytizing.xml b/1.3/Defs/PreceptDefs/Precepts_SexProselytizing.xml
index 8afe4c1..81e0f58 100644
--- a/1.3/Defs/PreceptDefs/Precepts_SexProselytizing.xml
+++ b/1.3/Defs/PreceptDefs/Precepts_SexProselytizing.xml
@@ -3,28 +3,17 @@
- Sex_Proselytizing
+ SexProselytizingUI/Issues/Submissive
-
- Proselyzing_By_Orgasm
- Sex_Proselytizing
-
- Orgasms converts both partners towards this ideology.
- Low
+ ProselyzingByOrgasm
+ SexProselytizing
+
+ Giving orgasm converts partner towards this ideology.
+ Medium50400
diff --git a/Source/IdeologyAddon/IdeoUtility.cs b/Source/IdeologyAddon/IdeoUtility.cs
index fcbb48b..d02dda3 100644
--- a/Source/IdeologyAddon/IdeoUtility.cs
+++ b/Source/IdeologyAddon/IdeoUtility.cs
@@ -49,7 +49,7 @@ namespace RJWSexperience.Ideology
// Option A: Partner has same Ideo as Pawn, increase certainty
if (sameIdeo)
{
- pawn.ideo.OffsetCertainty(severity);
+ partner.ideo.OffsetCertainty(severity);
}
// Option B: Partner as different Ideo, try to convert
else
diff --git a/Source/IdeologyAddon/Patches/RJW_Patch_Ideo.cs b/Source/IdeologyAddon/Patches/RJW_Patch_Ideo.cs
index ddb13db..a375f0c 100644
--- a/Source/IdeologyAddon/Patches/RJW_Patch_Ideo.cs
+++ b/Source/IdeologyAddon/Patches/RJW_Patch_Ideo.cs
@@ -210,42 +210,23 @@ namespace RJWSexperience.Ideology.Patches
ideo = mother?.Ideo;
return mother?.Faction ?? baby.Faction;
}
+ }
- [HarmonyPatch(typeof(JobDriver_Sex), "Roll_Orgasm_Duration_Reset")]
- public static class RJW_Patch_Orgasm_IdeoConversion
+ [HarmonyPatch(typeof(SexUtility), nameof(SexUtility.SatisfyPersonal))]
+ public static class RJW_Patch_Orgasm_IdeoConversion
+ {
+ public static void Postfix(SexProps props)
{
- public static void Postfix(JobDriver_Sex __instance)
- {
- // ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation)
- // TODO: From my Tests, this does still invoke on masturbation
- if (__instance.pawn == null || __instance.Partner == null)
- return;
- // Orgasm is called "all the time" - it exits early when the sex is still going.
- // Hence, we hijack the "Roll_Orgasm_Duration_Reset" which is fired after the real orgasm happened
- // But we have to check for one edge case, namely the function is also done when sex is initialized (which we catch by checking for orgasm > 0
- if (__instance.orgasms <= 0) return;
+ // ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation)
+ if (props.pawn != null && props.hasPartner())
+ return;
- if (__instance.Partner.Ideo.HasPrecept(VariousDefOf.Proselyzing_By_Orgasm))
- {
- // Pawn is the one having the orgasm
- // Partner is "giving" the orgasm, hence the pawn will be converted towards the partners ideology
- IdeoUtility.ConvertPawnBySex(__instance.pawn, __instance.Partner, 0.03f);
- }
+ if (props.partner.Ideo?.HasPrecept(VariousDefOf.ProselyzingByOrgasm) == true)
+ {
+ // Pawn is the one having the orgasm
+ // Partner is "giving" the orgasm, hence the pawn will be converted towards the partners ideology
+ IdeoUtility.ConvertPawnBySex(props.pawn, props.partner, 0.03f);
}
}
-
- // TODO: This does not work as intended!
- // Something is wrong with this, it's not called correctly.I expect this to be the wrong Harmony Patch Point
- [HarmonyPatch(typeof(SexUtility), "Aftersex", new Type[] { typeof(SexProps) })]
- public static class RJW_Patch_Aftersex_IdeoConversion
- {
- // This is not exactly where I should put it (Maybe after The JobDriver_Sex Finishes??)
- public static void Postfix(SexProps props)
- {
- IdeoUtility.ConvertPawnBySex(props.pawn, props.partner, props.orgasms * 0.03f);
- }
-
- }
-
}
}
diff --git a/Source/IdeologyAddon/VariousDefOf.cs b/Source/IdeologyAddon/VariousDefOf.cs
index 8e8456a..52d2180 100644
--- a/Source/IdeologyAddon/VariousDefOf.cs
+++ b/Source/IdeologyAddon/VariousDefOf.cs
@@ -21,7 +21,6 @@ namespace RJWSexperience.Ideology
[MayRequireIdeology] public static readonly PreceptDef BabyFaction_AlwaysColony;
[MayRequireIdeology] public static readonly PreceptDef Submissive_Male;
[MayRequireIdeology] public static readonly PreceptDef Submissive_Female;
- [MayRequireIdeology] public static readonly PreceptDef Proselyzing_By_Orgasm;
- //[MayRequireIdeology] public static readonly PreceptDef Proselyzing_By_Sex;
+ [MayRequireIdeology] public static readonly PreceptDef ProselyzingByOrgasm;
}
}