diff --git a/RJWSexperience/IdeologyAddon/Ideology/Patches/RJW_Patch_Ideo.cs b/RJWSexperience/IdeologyAddon/Ideology/Patches/RJW_Patch_Ideo.cs index cc7b79e..57f41ff 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/Patches/RJW_Patch_Ideo.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/Patches/RJW_Patch_Ideo.cs @@ -114,21 +114,9 @@ namespace RJWSexperience.Ideology.Patches public static void AfterSexHuman(Pawn human, Pawn partner, bool rape, bool isHumanReceiving = false) { - if (IdeoUtility.IsIncest(human, partner, false)) - { - if (IdeoUtility.IsIncest(human, partner, true)) - { - Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_CloseRelativeSex.CreateEvent(human)); - Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_CloseRelativeSex.CreateEvent(partner)); - } - 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)); - } + HistoryEventDef incestEvent = GetIncestTypeEvent(human, partner); + Find.HistoryEventsManager.RecordEvent(incestEvent.CreateEvent(human)); + Find.HistoryEventsManager.RecordEvent(incestEvent.CreateEvent(partner)); if (partner.IsAnimal()) { @@ -178,6 +166,17 @@ namespace RJWSexperience.Ideology.Patches } } + private static HistoryEventDef GetIncestTypeEvent(Pawn pawn, Pawn partner) + { + if (IdeoUtility.IsIncest(pawn, partner, true)) + return VariousDefOf.RSI_CloseRelativeSex; + + if (IdeoUtility.IsIncest(pawn, partner, false)) + return VariousDefOf.RSI_IncestuosSex; + + return VariousDefOf.RSI_NonIncestuosSex; + } + public static void RapeEffectSlave(Pawn victim) { Need_Suppression suppression = victim.needs.TryGetNeed(); diff --git a/RJWSexperience/IdeologyAddon/Ideology/Patches/Rimworld_Patch.cs b/RJWSexperience/IdeologyAddon/Ideology/Patches/Rimworld_Patch.cs index 4169593..6b612d6 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/Patches/Rimworld_Patch.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/Patches/Rimworld_Patch.cs @@ -16,16 +16,16 @@ namespace RJWSexperience.Ideology.Patches { if (IdeoUtility.IsIncest(firstPawn, secondPawn, true)) { - Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_CloseRelativeMarriage.CreateEvent(firstPawn)); - Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_CloseRelativeMarriage.CreateEvent(secondPawn)); + Find.HistoryEventsManager.RecordEvent(VariousDefOf.RSI_CloseRelativeMarriage.CreateEvent(firstPawn)); + Find.HistoryEventsManager.RecordEvent(VariousDefOf.RSI_CloseRelativeMarriage.CreateEvent(secondPawn)); } - Find.HistoryEventsManager.RecordEvent(VariousDefOf.Incestuos_Marriage.CreateEvent(firstPawn)); - Find.HistoryEventsManager.RecordEvent(VariousDefOf.Incestuos_Marriage.CreateEvent(secondPawn)); + Find.HistoryEventsManager.RecordEvent(VariousDefOf.RSI_IncestuosMarriage.CreateEvent(firstPawn)); + Find.HistoryEventsManager.RecordEvent(VariousDefOf.RSI_IncestuosMarriage.CreateEvent(secondPawn)); } else { - Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_NonIncestuosMarriage.CreateEvent(firstPawn)); - Find.HistoryEventsManager.RecordEvent(VariousDefOf.RJWSI_NonIncestuosMarriage.CreateEvent(secondPawn)); + Find.HistoryEventsManager.RecordEvent(VariousDefOf.RSI_NonIncestuosMarriage.CreateEvent(firstPawn)); + Find.HistoryEventsManager.RecordEvent(VariousDefOf.RSI_NonIncestuosMarriage.CreateEvent(secondPawn)); } } } diff --git a/RJWSexperience/IdeologyAddon/VariousDefOf.cs b/RJWSexperience/IdeologyAddon/VariousDefOf.cs index 078c84a..bbfa4f9 100644 --- a/RJWSexperience/IdeologyAddon/VariousDefOf.cs +++ b/RJWSexperience/IdeologyAddon/VariousDefOf.cs @@ -31,12 +31,12 @@ namespace RJWSexperience.Ideology [MayRequireIdeology] public static readonly HistoryEventDef OralSex = DefDatabase.GetNamed("OralSex"); [MayRequireIdeology] public static readonly HistoryEventDef MiscSex = DefDatabase.GetNamed("MiscSex"); [MayRequireIdeology] public static readonly HistoryEventDef PromiscuousSex = DefDatabase.GetNamed("PromiscuousSex"); - [MayRequireIdeology] public static readonly HistoryEventDef RJWSI_CloseRelativeMarriage = DefDatabase.GetNamed("RJWSI_CloseRelativeMarriage"); - [MayRequireIdeology] public static readonly HistoryEventDef Incestuos_Marriage = DefDatabase.GetNamed("Incestuos_Marriage"); - [MayRequireIdeology] public static readonly HistoryEventDef RJWSI_NonIncestuosMarriage = DefDatabase.GetNamed("RJWSI_NonIncestuosMarriage"); - [MayRequireIdeology] public static readonly HistoryEventDef RJWSI_CloseRelativeSex = DefDatabase.GetNamed("RJWSI_CloseRelativeSex"); - [MayRequireIdeology] public static readonly HistoryEventDef RJWSI_IncestuosSex = DefDatabase.GetNamed("RJWSI_IncestuosSex"); - [MayRequireIdeology] public static readonly HistoryEventDef RJWSI_NonIncestuosSex = DefDatabase.GetNamed("RJWSI_NonIncestuosSex"); + [MayRequireIdeology] public static readonly HistoryEventDef RSI_CloseRelativeMarriage = DefDatabase.GetNamed("RSI_CloseRelativeMarriage"); + [MayRequireIdeology] public static readonly HistoryEventDef RSI_IncestuosMarriage = DefDatabase.GetNamed("RSI_IncestuosMarriage"); + [MayRequireIdeology] public static readonly HistoryEventDef RSI_NonIncestuosMarriage = DefDatabase.GetNamed("RSI_NonIncestuosMarriage"); + [MayRequireIdeology] public static readonly HistoryEventDef RSI_CloseRelativeSex = DefDatabase.GetNamed("RSI_CloseRelativeSex"); + [MayRequireIdeology] public static readonly HistoryEventDef RSI_IncestuosSex = DefDatabase.GetNamed("RSI_IncestuosSex"); + [MayRequireIdeology] public static readonly HistoryEventDef RSI_NonIncestuosSex = DefDatabase.GetNamed("RSI_NonIncestuosSex"); [MayRequireIdeology] public static readonly HistoryEventDef SexWithCorpse = DefDatabase.GetNamed("SexWithCorpse"); [MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenF = DefDatabase.GetNamed("Virgin_TakenF"); [MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenM = DefDatabase.GetNamed("Virgin_TakenM"); diff --git a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Incest.xml b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Incest.xml index 7a95ea6..485a77c 100644 --- a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Incest.xml +++ b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Incest.xml @@ -9,32 +9,32 @@ - RJWSI_CloseRelativeMarriage + RSI_CloseRelativeMarriage - Incestuos_Marriage + RSI_IncestuosMarriage - RJWSI_NonIncestuosMarriage + RSI_NonIncestuosMarriage - RJWSI_CloseRelativeSex + RSI_CloseRelativeSex - RJWSI_IncestuosSex + RSI_IncestuosSex - RJWSI_NonIncestuosSex + RSI_NonIncestuosSex @@ -62,11 +62,11 @@ 100
  • - RJWSI_CloseRelativeMarriage + RSI_CloseRelativeMarriage IncestuosMarriage_Disapproved
  • - RJWSI_CloseRelativeSex + RSI_CloseRelativeSex Sex_Know_Incest_Disapproved
  • @@ -107,15 +107,15 @@ 100
  • - Incestuos_Marriage + RSI_IncestuosMarriage IncestuosMarriage_Disapproved
  • - Incestuos_Marriage + RSI_IncestuosMarriage Sex_Know_IncestMarriage_Disapproved
  • - RJWSI_IncestuosSex + RSI_IncestuosSex Sex_Know_Incest_Disapproved
  • @@ -164,15 +164,15 @@ 100
  • - Incestuos_Marriage + RSI_IncestuosMarriage IncestuosMarriage_Forbidden
  • - Incestuos_Marriage + RSI_IncestuosMarriage Sex_Know_IncestMarriage_Forbidden
  • - RJWSI_IncestuosSex + RSI_IncestuosSex Sex_Know_Incest_Forbidden
  • @@ -223,11 +223,11 @@
  • - RJWSI_NonIncestuosMarriage + RSI_NonIncestuosMarriage Sex_Know_IncestMarriage_Violated
  • - RJWSI_NonIncestuosSex + RSI_NonIncestuosSex Sex_Know_Incest_Violated