RJW-Sexperience/RJWSexperience/IdeologyAddon/Ideology/Sexperience_Patch.cs

45 lines
1.3 KiB
C#
Raw Normal View History

2022-02-25 14:15:48 +00:00
using RimWorld;
2021-09-24 15:14:02 +00:00
using rjw;
using Verse;
namespace RJWSexperience.Ideology
{
2022-02-25 14:15:48 +00:00
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;
}
2021-09-24 15:14:02 +00:00
2022-02-25 14:15:48 +00:00
if (pawn.gender == Gender.Male)
{
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenM.TaggedEvent(pawn, tag + HETag.Gender(pawn), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookM.TaggedEvent(partner, tag + HETag.Gender(pawn), pawn));
}
else
{
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenF.TaggedEvent(pawn, tag + HETag.Gender(pawn), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookF.TaggedEvent(partner, tag + HETag.Gender(pawn), pawn));
}
}
}
2021-09-24 15:14:02 +00:00
2022-02-25 14:15:48 +00:00
public static class Sexperience_Patch_IsIncest
{
public static bool Prefix(Pawn pawn, Pawn otherpawn, ref bool __result)
{
__result = IdeoUtility.IsIncest(pawn, otherpawn);
return false;
}
}
2021-09-24 15:14:02 +00:00
}