2023-04-23 10:38:38 +00:00
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using rjw;
|
2022-07-26 03:55:56 +00:00
|
|
|
|
using RJWSexperience.Ideology.HistoryEvents;
|
|
|
|
|
using Verse;
|
|
|
|
|
|
|
|
|
|
namespace RJWSexperience.Ideology.Patches
|
|
|
|
|
{
|
2023-04-23 10:38:38 +00:00
|
|
|
|
[HarmonyPatch("RJWSexperience.RJWUtility", "ThrowVirginHistoryEvent")]
|
2022-07-26 03:55:56 +00:00
|
|
|
|
public static class Sexperience_Patch_ThrowVirginHistoryEvent
|
|
|
|
|
{
|
2023-04-23 10:38:38 +00:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|