RJW-Sexperience/RJWSexperience/IdeologyAddon/Ideology/Patches/Sexperience_Patch.cs
2022-07-02 23:05:19 +05:00

34 lines
1.1 KiB
C#

using RimWorld;
using rjw;
using Verse;
namespace RJWSexperience.Ideology.Patches
{
public static class Sexperience_Patch_ThrowVirginHIstoryEvent
{
public static void Postfix(Pawn pawn, Pawn partner, SexProps props, int degree)
{
string tag = "";
if (props.isRape)
{
if (pawn == props.pawn && props.isRapist) tag += HETag.Rape;
else tag += HETag.BeenRaped;
}
if (!pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, partner))
{
tag += HETag.NotSpouse;
}
if (pawn.gender == Gender.Male)
{
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenM.CreateTaggedEvent(pawn, tag + HETag.Gender(pawn), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookM.CreateTaggedEvent(partner, tag + HETag.Gender(pawn), pawn));
}
else
{
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenF.CreateTaggedEvent(pawn, tag + HETag.Gender(pawn), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookF.CreateTaggedEvent(partner, tag + HETag.Gender(pawn), pawn));
}
}
}
}