Separate incestuos HistoryEvents

This commit is contained in:
amevarashi 2022-06-24 23:47:20 +05:00
parent d7fad466ee
commit 282f8f4283
5 changed files with 60 additions and 130 deletions

View file

@ -4,10 +4,8 @@ namespace RJWSexperience.Ideology
{
public static class HETag
{
public const string Incestous = "[Incestuos]";
public const string BeenRaped = "[BeenRaped]";
public const string Rape = "[Rape]";
public const string Spouse = "[Spouse]";
public const string NotSpouse = "[NotSpouse]";
public static string Gender(Pawn pawn) => "[" + pawn.gender + "]";

View file

@ -104,15 +104,17 @@ namespace RJWSexperience.Ideology.Patches
public static void AfterSexHuman(Pawn human, Pawn partner, bool rape, xxx.rjwSextype sextype, bool isHumanReceiving = false)
{
if (partner.Dead)
{
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithCorpse.CreateEvent(human));
return;
}
string tag = "";
if (IdeoUtility.IsIncest(human, partner))
{
tag += HETag.Incestous;
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_IncestuosSex.CreateEvent(human));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_IncestuosSex.CreateEvent(partner));
}
else
{
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_NonIncestuosSex.CreateEvent(human));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_NonIncestuosSex.CreateEvent(partner));
}
if (partner.IsAnimal())
@ -123,26 +125,26 @@ namespace RJWSexperience.Ideology.Patches
RapeEffectSlave(human);
if (human.Ideo?.IsVeneratedAnimal(partner) ?? false)
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithVeneratedAnimal.CreateTaggedEvent(human, tag + HETag.BeenRaped + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithVeneratedAnimal.CreateTaggedEvent(human, HETag.BeenRaped + HETag.Gender(human), partner));
else
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithAnimal.CreateTaggedEvent(human, tag + HETag.BeenRaped + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithAnimal.CreateTaggedEvent(human, HETag.BeenRaped + HETag.Gender(human), partner));
if (human.Ideo != null && human.relations?.DirectRelationExists(PawnRelationDefOf.Bond, partner) == true)
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithBondedAnimal.CreateTaggedEvent(human, tag + HETag.BeenRaped + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithBondedAnimal.CreateTaggedEvent(human, HETag.BeenRaped + HETag.Gender(human), partner));
else
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithNonBondAnimal.CreateTaggedEvent(human, tag + HETag.BeenRaped + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithNonBondAnimal.CreateTaggedEvent(human, HETag.BeenRaped + HETag.Gender(human), partner));
}
else
{
if (human.Ideo?.IsVeneratedAnimal(partner) ?? false)
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithVeneratedAnimal.CreateTaggedEvent(human, tag + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithVeneratedAnimal.CreateTaggedEvent(human, HETag.Gender(human), partner));
else
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithAnimal.CreateTaggedEvent(human, tag + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithAnimal.CreateTaggedEvent(human, HETag.Gender(human), partner));
if (human.Ideo != null && human.relations?.DirectRelationExists(PawnRelationDefOf.Bond, partner) == true)
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithBondedAnimal.CreateTaggedEvent(human, tag + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithBondedAnimal.CreateTaggedEvent(human, HETag.Gender(human), partner));
else
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithNonBondAnimal.CreateTaggedEvent(human, tag + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithNonBondAnimal.CreateTaggedEvent(human, HETag.Gender(human), partner));
}
}
else if (xxx.is_human(partner))
@ -151,20 +153,20 @@ namespace RJWSexperience.Ideology.Patches
{
if (partner.IsSlave)
{
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RapedSlave.CreateTaggedEvent(human, tag + HETag.Rape + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRapedSlave.CreateTaggedEvent(partner, tag + HETag.BeenRaped + HETag.Gender(partner), human));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RapedSlave.CreateTaggedEvent(human, HETag.Rape + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRapedSlave.CreateTaggedEvent(partner, HETag.BeenRaped + HETag.Gender(partner), human));
RapeEffectSlave(partner);
}
else if (partner.IsPrisoner)
{
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RapedPrisoner.CreateTaggedEvent(human, tag + HETag.Rape + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRapedPrisoner.CreateTaggedEvent(partner, tag + HETag.BeenRaped + HETag.Gender(partner), human));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RapedPrisoner.CreateTaggedEvent(human, HETag.Rape + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRapedPrisoner.CreateTaggedEvent(partner, HETag.BeenRaped + HETag.Gender(partner), human));
partner.guest.will = Math.Max(0, partner.guest.will - 0.2f);
}
else
{
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Raped.CreateTaggedEvent(human, tag + HETag.Rape + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRaped.CreateTaggedEvent(partner, tag + HETag.BeenRaped + HETag.Gender(partner), human));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Raped.CreateTaggedEvent(human, HETag.Rape + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRaped.CreateTaggedEvent(partner, HETag.BeenRaped + HETag.Gender(partner), human));
}
}
else
@ -172,8 +174,8 @@ namespace RJWSexperience.Ideology.Patches
HistoryEventDef sexEventDef = IdeoUtility.GetSextypeEventDef(sextype);
if (sexEventDef != null)
{
Find.HistoryEventsManager.RecordEvent(sexEventDef.CreateTaggedEvent(human, tag + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(sexEventDef.CreateTaggedEvent(partner, tag + HETag.Gender(partner), human));
Find.HistoryEventsManager.RecordEvent(sexEventDef.CreateEvent(human));
Find.HistoryEventsManager.RecordEvent(sexEventDef.CreateEvent(partner));
}
}
}

View file

@ -14,8 +14,13 @@ namespace RJWSexperience.Ideology.Patches
{
if (IdeoUtility.IsIncest(firstPawn, secondPawn))
{
Find.HistoryEventsManager.RecordEvent(new HistoryEvent(VariousDefOf.Incestuos_Marriage, firstPawn.Named(HistoryEventArgsNames.Doer)));
Find.HistoryEventsManager.RecordEvent(new HistoryEvent(VariousDefOf.Incestuos_Marriage, secondPawn.Named(HistoryEventArgsNames.Doer)));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Incestuos_Marriage.CreateEvent(firstPawn));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Incestuos_Marriage.CreateEvent(secondPawn));
}
else
{
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_NonIncestuosMarriage.CreateEvent(firstPawn));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_NonIncestuosMarriage.CreateEvent(secondPawn));
}
}
}

View file

@ -31,6 +31,9 @@ namespace RJWSexperience.Ideology
[MayRequireIdeology] public static readonly HistoryEventDef MiscSex = DefDatabase<HistoryEventDef>.GetNamed("MiscSex");
[MayRequireIdeology] public static readonly HistoryEventDef PromiscuousSex = DefDatabase<HistoryEventDef>.GetNamed("PromiscuousSex");
[MayRequireIdeology] public static readonly HistoryEventDef Incestuos_Marriage = DefDatabase<HistoryEventDef>.GetNamed("Incestuos_Marriage");
[MayRequireIdeology] public static readonly HistoryEventDef RJWSI_NonIncestuosMarriage = DefDatabase<HistoryEventDef>.GetNamed("RJWSI_NonIncestuosMarriage");
[MayRequireIdeology] public static readonly HistoryEventDef RJWSI_IncestuosSex = DefDatabase<HistoryEventDef>.GetNamed("RJWSI_IncestuosSex");
[MayRequireIdeology] public static readonly HistoryEventDef RJWSI_NonIncestuosSex = DefDatabase<HistoryEventDef>.GetNamed("RJWSI_NonIncestuosSex");
[MayRequireIdeology] public static readonly HistoryEventDef SexWithCorpse = DefDatabase<HistoryEventDef>.GetNamed("SexWithCorpse");
[MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenF = DefDatabase<HistoryEventDef>.GetNamed("Virgin_TakenF");
[MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenM = DefDatabase<HistoryEventDef>.GetNamed("Virgin_TakenM");

View file

@ -13,6 +13,21 @@
<label>Incestuos marriage</label>
</HistoryEventDef>
<HistoryEventDef>
<defName>RJWSI_NonIncestuosMarriage</defName>
<label>Non-incestuos marriage</label>
</HistoryEventDef>
<HistoryEventDef>
<defName>RJWSI_IncestuosSex</defName>
<label>Incestuos sex</label>
</HistoryEventDef>
<HistoryEventDef>
<defName>RJWSI_NonIncestuosSex</defName>
<label>Non-incestuos sex</label>
</HistoryEventDef>
<!-- Precepts -->
<PreceptDef>
@ -26,7 +41,6 @@
<defaultSelectionWeight>100</defaultSelectionWeight>
</PreceptDef>
<PreceptDef>
<defName>Incestuos_Disapproved_CloseOnly</defName>
<issue>Incestuos</issue>
@ -41,30 +55,9 @@
<eventDef>Incestuos_Marriage</eventDef>
<thought>IncestuosMarriage_Disapproved</thought>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>VaginalSex</eventDef>
<li Class="PreceptComp_KnowsMemoryThought">
<eventDef>RJWSI_IncestuosSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>AnalSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>OralSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>MiscSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>PromiscuousSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
</comps>
<modExtensions>
@ -107,34 +100,13 @@
<eventDef>Incestuos_Marriage</eventDef>
<thought>IncestuosMarriage_Disapproved</thought>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<li Class="PreceptComp_KnowsMemoryThought">
<eventDef>Incestuos_Marriage</eventDef>
<thought>Sex_Know_IncestMarriage_Disapproved</thought>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>VaginalSex</eventDef>
<li Class="PreceptComp_KnowsMemoryThought">
<eventDef>RJWSI_IncestuosSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>AnalSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>OralSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>MiscSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>PromiscuousSex</eventDef>
<thought>Sex_Know_Incest_Disapproved</thought>
<tag>Incestuos</tag>
</li>
</comps>
<modExtensions>
@ -185,34 +157,13 @@
<eventDef>Incestuos_Marriage</eventDef>
<thought>IncestuosMarriage_Forbidden</thought>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<li Class="PreceptComp_KnowsMemoryThought">
<eventDef>Incestuos_Marriage</eventDef>
<thought>Sex_Know_IncestMarriage_Forbidden</thought>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>VaginalSex</eventDef>
<li Class="PreceptComp_KnowsMemoryThought">
<eventDef>RJWSI_IncestuosSex</eventDef>
<thought>Sex_Know_Incest_Forbidden</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>AnalSex</eventDef>
<thought>Sex_Know_Incest_Forbidden</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>OralSex</eventDef>
<thought>Sex_Know_Incest_Forbidden</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>MiscSex</eventDef>
<thought>Sex_Know_Incest_Forbidden</thought>
<tag>Incestuos</tag>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>PromiscuousSex</eventDef>
<thought>Sex_Know_Incest_Forbidden</thought>
<tag>Incestuos</tag>
</li>
</comps>
<modExtensions>
@ -261,41 +212,13 @@
<li>Zoophile</li>
</conflictingMemes>
<comps>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>GotMarried_SpouseCount_OneOrFewer</eventDef>
<li Class="PreceptComp_KnowsMemoryThought">
<eventDef>RJWSI_NonIncestuosMarriage</eventDef>
<thought>Sex_Know_IncestMarriage_Violated</thought>
<tag>Incestuos</tag>
<exclusive>true</exclusive>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>VaginalSex</eventDef>
<li Class="PreceptComp_KnowsMemoryThought">
<eventDef>RJWSI_NonIncestuosSex</eventDef>
<thought>Sex_Know_Incest_Violated</thought>
<tag>Incestuos</tag>
<exclusive>true</exclusive>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>AnalSex</eventDef>
<thought>Sex_Know_Incest_Violated</thought>
<tag>Incestuos</tag>
<exclusive>true</exclusive>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>OralSex</eventDef>
<thought>Sex_Know_Incest_Violated</thought>
<tag>Incestuos</tag>
<exclusive>true</exclusive>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>MiscSex</eventDef>
<thought>Sex_Know_Incest_Violated</thought>
<tag>Incestuos</tag>
<exclusive>true</exclusive>
</li>
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
<eventDef>PromiscuousSex</eventDef>
<thought>Sex_Know_Incest_Violated</thought>
<tag>Incestuos</tag>
<exclusive>true</exclusive>
</li>
</comps>
<modExtensions>
@ -457,7 +380,6 @@
</stages>
</ThoughtDef>
<ThoughtDef>
<defName>Sex_Know_Incest_Violated</defName>
<thoughtClass>Thought_MemorySocial</thoughtClass>