From 10131137181787ee734ded14124d089b4a24ef87 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Sat, 4 Jun 2022 13:02:23 +0500 Subject: [PATCH] Remove RJWUtility.UpdatePartnerHistory --- RJWSexperience/RJWSexperience/Patches/RJW_Patch.cs | 9 ++++++--- RJWSexperience/RJWSexperience/RJWUtility.cs | 9 --------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/RJWSexperience/RJWSexperience/Patches/RJW_Patch.cs b/RJWSexperience/RJWSexperience/Patches/RJW_Patch.cs index 95d61cd..4485b64 100644 --- a/RJWSexperience/RJWSexperience/Patches/RJW_Patch.cs +++ b/RJWSexperience/RJWSexperience/Patches/RJW_Patch.cs @@ -164,10 +164,13 @@ namespace RJWSexperience public static void Postfix(SexProps props) { RJWUtility.UpdateSextypeRecords(props); - RJWUtility.UpdatePartnerHistory(props.pawn, props.partner, props); - RJWUtility.UpdatePartnerHistory(props.partner, props.pawn, props); - } + if (props.partner == null) + return; + + props.pawn.TryGetComp()?.RecordSex(props.partner, props); + props.partner.TryGetComp()?.RecordSex(props.pawn, props); + } } [HarmonyPatch(typeof(JobDriver_SexBaseInitiator), "Start")] diff --git a/RJWSexperience/RJWSexperience/RJWUtility.cs b/RJWSexperience/RJWSexperience/RJWUtility.cs index 2bb00f9..f43d9d8 100644 --- a/RJWSexperience/RJWSexperience/RJWUtility.cs +++ b/RJWSexperience/RJWSexperience/RJWUtility.cs @@ -4,7 +4,6 @@ using rjw.Modules.Interactions.Enums; using rjw.Modules.Interactions.Helpers; using rjw.Modules.Interactions.Objects; using System.Collections.Generic; -using System.Linq; using Verse; using Verse.AI; @@ -156,14 +155,6 @@ namespace RJWSexperience } } - public static void UpdatePartnerHistory(Pawn pawn, Pawn partner, SexProps props) - { - if (partner != null) - { - pawn.TryGetComp()?.RecordSex(partner, props); - } - } - public static void IncreaseSameRecords(Pawn pawn, Pawn partner, RecordDef record) { pawn.records?.AddTo(record, 1);