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 static class HETag
{ {
public const string Incestous = "[Incestuos]";
public const string BeenRaped = "[BeenRaped]"; public const string BeenRaped = "[BeenRaped]";
public const string Rape = "[Rape]"; public const string Rape = "[Rape]";
public const string Spouse = "[Spouse]";
public const string NotSpouse = "[NotSpouse]"; public const string NotSpouse = "[NotSpouse]";
public static string Gender(Pawn pawn) => "[" + pawn.gender + "]"; 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) public static void AfterSexHuman(Pawn human, Pawn partner, bool rape, xxx.rjwSextype sextype, bool isHumanReceiving = false)
{ {
if (partner.Dead) if (partner.Dead)
{
Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithCorpse.CreateEvent(human)); Find.HistoryEventsManager.RecordEvent(VariousDefOf.SexWithCorpse.CreateEvent(human));
return;
}
string tag = "";
if (IdeoUtility.IsIncest(human, partner)) 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()) if (partner.IsAnimal())
@ -123,26 +125,26 @@ namespace RJWSexperience.Ideology.Patches
RapeEffectSlave(human); RapeEffectSlave(human);
if (human.Ideo?.IsVeneratedAnimal(partner) ?? false) 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 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) 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 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 else
{ {
if (human.Ideo?.IsVeneratedAnimal(partner) ?? false) 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 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) 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 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)) else if (xxx.is_human(partner))
@ -151,20 +153,20 @@ namespace RJWSexperience.Ideology.Patches
{ {
if (partner.IsSlave) if (partner.IsSlave)
{ {
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RapedSlave.CreateTaggedEvent(human, tag + HETag.Rape + HETag.Gender(human), partner)); Find.HistoryEventsManager.RecordEvent(VariousDefOf.RapedSlave.CreateTaggedEvent(human, HETag.Rape + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRapedSlave.CreateTaggedEvent(partner, tag + HETag.BeenRaped + HETag.Gender(partner), human)); Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRapedSlave.CreateTaggedEvent(partner, HETag.BeenRaped + HETag.Gender(partner), human));
RapeEffectSlave(partner); RapeEffectSlave(partner);
} }
else if (partner.IsPrisoner) else if (partner.IsPrisoner)
{ {
Find.HistoryEventsManager.RecordEvent(VariousDefOf.RapedPrisoner.CreateTaggedEvent(human, tag + HETag.Rape + HETag.Gender(human), partner)); Find.HistoryEventsManager.RecordEvent(VariousDefOf.RapedPrisoner.CreateTaggedEvent(human, HETag.Rape + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRapedPrisoner.CreateTaggedEvent(partner, tag + HETag.BeenRaped + HETag.Gender(partner), human)); Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRapedPrisoner.CreateTaggedEvent(partner, HETag.BeenRaped + HETag.Gender(partner), human));
partner.guest.will = Math.Max(0, partner.guest.will - 0.2f); partner.guest.will = Math.Max(0, partner.guest.will - 0.2f);
} }
else else
{ {
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Raped.CreateTaggedEvent(human, tag + HETag.Rape + HETag.Gender(human), partner)); Find.HistoryEventsManager.RecordEvent(VariousDefOf.Raped.CreateTaggedEvent(human, HETag.Rape + HETag.Gender(human), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRaped.CreateTaggedEvent(partner, tag + HETag.BeenRaped + HETag.Gender(partner), human)); Find.HistoryEventsManager.RecordEvent(VariousDefOf.WasRaped.CreateTaggedEvent(partner, HETag.BeenRaped + HETag.Gender(partner), human));
} }
} }
else else
@ -172,8 +174,8 @@ namespace RJWSexperience.Ideology.Patches
HistoryEventDef sexEventDef = IdeoUtility.GetSextypeEventDef(sextype); HistoryEventDef sexEventDef = IdeoUtility.GetSextypeEventDef(sextype);
if (sexEventDef != null) if (sexEventDef != null)
{ {
Find.HistoryEventsManager.RecordEvent(sexEventDef.CreateTaggedEvent(human, tag + HETag.Gender(human), partner)); Find.HistoryEventsManager.RecordEvent(sexEventDef.CreateEvent(human));
Find.HistoryEventsManager.RecordEvent(sexEventDef.CreateTaggedEvent(partner, tag + HETag.Gender(partner), human)); Find.HistoryEventsManager.RecordEvent(sexEventDef.CreateEvent(partner));
} }
} }
} }

View file

@ -14,8 +14,13 @@ namespace RJWSexperience.Ideology.Patches
{ {
if (IdeoUtility.IsIncest(firstPawn, secondPawn)) if (IdeoUtility.IsIncest(firstPawn, secondPawn))
{ {
Find.HistoryEventsManager.RecordEvent(new HistoryEvent(VariousDefOf.Incestuos_Marriage, firstPawn.Named(HistoryEventArgsNames.Doer))); Find.HistoryEventsManager.RecordEvent(VariousDefOf.Incestuos_Marriage.CreateEvent(firstPawn));
Find.HistoryEventsManager.RecordEvent(new HistoryEvent(VariousDefOf.Incestuos_Marriage, secondPawn.Named(HistoryEventArgsNames.Doer))); 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 MiscSex = DefDatabase<HistoryEventDef>.GetNamed("MiscSex");
[MayRequireIdeology] public static readonly HistoryEventDef PromiscuousSex = DefDatabase<HistoryEventDef>.GetNamed("PromiscuousSex"); [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 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 SexWithCorpse = DefDatabase<HistoryEventDef>.GetNamed("SexWithCorpse");
[MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenF = DefDatabase<HistoryEventDef>.GetNamed("Virgin_TakenF"); [MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenF = DefDatabase<HistoryEventDef>.GetNamed("Virgin_TakenF");
[MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenM = DefDatabase<HistoryEventDef>.GetNamed("Virgin_TakenM"); [MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenM = DefDatabase<HistoryEventDef>.GetNamed("Virgin_TakenM");

View file

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