rjw-sexperience-ideology/Source/IdeologyAddon/Patches/Sexperience_Patch.cs

26 lines
832 B
C#
Raw Permalink Normal View History

using HarmonyLib;
using rjw;
2022-07-26 03:55:56 +00:00
using RJWSexperience.Ideology.HistoryEvents;
using Verse;
namespace RJWSexperience.Ideology.Patches
{
[HarmonyPatch("RJWSexperience.RJWUtility", "ThrowVirginHistoryEvent")]
2022-07-26 03:55:56 +00:00
public static class Sexperience_Patch_ThrowVirginHistoryEvent
{
public static bool Prepare() => ModsConfig.IsActive("rjw.sexperience");
2022-07-26 03:55:56 +00:00
public static void Postfix(Pawn exVirgin, Pawn partner, SexProps props, int degree)
{
const int femaleAfterSurgery = 1;
if (props.isRape && exVirgin == props.partner)
2023-04-23 11:41:27 +00:00
RsiDefOf.HistoryEvent.RSI_VirginStolen.RecordEventWithPartner(exVirgin, partner);
2022-07-26 03:55:56 +00:00
else if (degree != femaleAfterSurgery)
2023-04-23 11:41:27 +00:00
RsiDefOf.HistoryEvent.RSI_VirginTaken.RecordEventWithPartner(exVirgin, partner);
2022-07-26 03:55:56 +00:00
2023-04-23 11:41:27 +00:00
RsiDefOf.HistoryEvent.RSI_TookVirgin.RecordEventWithPartner(partner, exVirgin);
2022-07-26 03:55:56 +00:00
}
}
}