Compare commits

..

No commits in common. "355d409eb689fe20d91ec705b8c64a27a0168127" and "bcc9feb61a05bde76ba68e2ddbdf1b5709a02805" have entirely different histories.

5 changed files with 22 additions and 46 deletions

View file

@ -111,15 +111,6 @@
<displayOrderInIssue>60</displayOrderInIssue> <displayOrderInIssue>60</displayOrderInIssue>
<displayOrderInImpact>1000</displayOrderInImpact> <displayOrderInImpact>1000</displayOrderInImpact>
<defaultSelectionWeight>100</defaultSelectionWeight> <defaultSelectionWeight>100</defaultSelectionWeight>
<modExtensions>
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_Incest">
<allowManualRomanceOnlyFor>
<li>CloseRelative</li>
<li>FarRelative</li>
<li>NotRelated</li>
</allowManualRomanceOnlyFor>
</li>
</modExtensions>
</PreceptDef> </PreceptDef>
<PreceptDef> <PreceptDef>
@ -166,12 +157,6 @@
</li> </li>
</rules> </rules>
</li> </li>
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_Incest">
<allowManualRomanceOnlyFor>
<li>FarRelative</li>
<li>NotRelated</li>
</allowManualRomanceOnlyFor>
</li>
</modExtensions> </modExtensions>
</PreceptDef> </PreceptDef>
@ -290,12 +275,6 @@
</li> </li>
</rules> </rules>
</li> </li>
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_Incest">
<allowManualRomanceOnlyFor>
<li>CloseRelative</li>
<li>FarRelative</li>
</allowManualRomanceOnlyFor>
</li>
</modExtensions> </modExtensions>
</PreceptDef> </PreceptDef>

View file

@ -76,11 +76,11 @@
<thought>BeenRaped_NotSubmissive</thought> <thought>BeenRaped_NotSubmissive</thought>
<gender>Female</gender> <gender>Female</gender>
</li> </li>
<!--<li Class="RJWSexperience.Ideology.Precepts.Comp_KnowsMemoryThought_Gendered"> <li Class="RJWSexperience.Ideology.Precepts.Comp_KnowsMemoryThought_Gendered">
<eventDef>RSI_RapedSlave</eventDef> <eventDef>RSI_RapedSlave</eventDef>
<thought>Raped_Know_NotBeingSubmissive</thought> <thought>Raped_Know_NotBeingSubmissive</thought>
<doersGender>Male</doersGender> <doersGender>Male</doersGender>
</li>--> </li>
</comps> </comps>
</PreceptDef> </PreceptDef>
@ -140,11 +140,11 @@
<thought>BeenRaped_NotSubmissive</thought> <thought>BeenRaped_NotSubmissive</thought>
<gender>Male</gender> <gender>Male</gender>
</li> </li>
<!--<li Class="RJWSexperience.Ideology.Precepts.Comp_KnowsMemoryThought_Gendered"> <li Class="RJWSexperience.Ideology.Precepts.Comp_KnowsMemoryThought_Gendered">
<eventDef>RSI_RapedSlave</eventDef> <eventDef>RSI_RapedSlave</eventDef>
<thought>Raped_Know_NotBeingSubmissive</thought> <thought>Raped_Know_NotBeingSubmissive</thought>
<doersGender>Female</doersGender> <doersGender>Female</doersGender>
</li>--> </li>
</comps> </comps>
</PreceptDef> </PreceptDef>

View file

@ -53,7 +53,6 @@
<Compile Include="Harmony.cs" /> <Compile Include="Harmony.cs" />
<Compile Include="HistoryEvents\ArgsNamesCustom.cs" /> <Compile Include="HistoryEvents\ArgsNamesCustom.cs" />
<Compile Include="Keyed.cs" /> <Compile Include="Keyed.cs" />
<Compile Include="Precepts\DefExtension_Incest.cs" />
<Compile Include="PreceptWorkers\ThoughtWorker_Precept_GenitalSize.cs" /> <Compile Include="PreceptWorkers\ThoughtWorker_Precept_GenitalSize.cs" />
<Compile Include="PreceptWorkers\ThoughtWorker_Precept_GenitalSize_Social.cs" /> <Compile Include="PreceptWorkers\ThoughtWorker_Precept_GenitalSize_Social.cs" />
<Compile Include="PreceptWorkers\ThoughtWorker_Precept_NonPregnant.cs" /> <Compile Include="PreceptWorkers\ThoughtWorker_Precept_NonPregnant.cs" />
@ -99,7 +98,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref"> <PackageReference Include="Krafs.Rimworld.Ref">
<Version>1.4.3555</Version> <Version>1.4.3542</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Lib.Harmony"> <PackageReference Include="Lib.Harmony">
<Version>2.2.2</Version> <Version>2.2.2</Version>

View file

@ -80,15 +80,29 @@ namespace RJWSexperience.Ideology.Patches
public static bool RsiIncestuous(Pawn one, Pawn two) public static bool RsiIncestuous(Pawn one, Pawn two)
{ {
PreceptDef incestuousPrecept = one.Ideo?.PreceptsListForReading.Select(precept => precept.def).FirstOrFallback(def => def.issue == VariousDefOf.Incestuos); PreceptDef incestuousPrecept = one.Ideo?.PreceptsListForReading.Select(precept => precept.def).FirstOrFallback(def => def.issue == VariousDefOf.Incestuos);
var allowManualRomanceOnlyFor = incestuousPrecept?.GetModExtension<DefExtension_Incest>()?.allowManualRomanceOnlyFor;
BloodRelationDegree relationDegree = RelationHelpers.GetBloodRelationDegree(one, two); BloodRelationDegree relationDegree = RelationHelpers.GetBloodRelationDegree(one, two);
if (allowManualRomanceOnlyFor == null) if (incestuousPrecept == null ||
incestuousPrecept == RsiPreceptDefOf.Incestuos_Disapproved ||
incestuousPrecept == RsiPreceptDefOf.Incestuos_Forbidden)
{ {
return relationDegree < BloodRelationDegree.NotRelated; return relationDegree < BloodRelationDegree.NotRelated;
} }
else if (incestuousPrecept == RsiPreceptDefOf.Incestuos_Free)
{
return false;
}
else if (incestuousPrecept == RsiPreceptDefOf.Incestuos_Disapproved_CloseOnly)
{
return relationDegree == BloodRelationDegree.CloseRelative;
}
else if (incestuousPrecept == RsiPreceptDefOf.Incestuos_IncestOnly)
{
return relationDegree == BloodRelationDegree.NotRelated;
}
return !allowManualRomanceOnlyFor.Contains(relationDegree); // Modded incestuous precept?
return true;
} }
} }
} }

View file

@ -1,16 +0,0 @@
using RJWSexperience.Ideology.Filters;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Verse;
namespace RJWSexperience.Ideology.Precepts
{
/// <summary>
/// Special Def extension for the Incestuous issue precepts
/// </summary>
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Def loader")]
public class DefExtension_Incest : DefModExtension
{
public List<BloodRelationDegree> allowManualRomanceOnlyFor;
}
}