diff --git a/Languages/English/Keyed/RJW_Sexperience.xml b/Languages/English/Keyed/RJW_Sexperience.xml
index 2e7e042..b940472 100644
--- a/Languages/English/Keyed/RJW_Sexperience.xml
+++ b/Languages/English/Keyed/RJW_Sexperience.xml
@@ -83,6 +83,8 @@
Only used for generating records. Get minimum sexable age from the first reproductive life stage. Works better for races with a long lifespan
Maximum lust change per sex
Set how much lust can change from a single sex act
+ Enable Bastard relation
+ Child is marked as a bastard if they have only one parent or their parents are (or was) married
Vaginal
Anal
diff --git a/RJWSexperience/RJWSexperience/Configurations.cs b/RJWSexperience/RJWSexperience/Configurations.cs
index 5ef06d2..fa7bf44 100644
--- a/RJWSexperience/RJWSexperience/Configurations.cs
+++ b/RJWSexperience/RJWSexperience/Configurations.cs
@@ -13,6 +13,7 @@ namespace RJWSexperience
public const float SexPerYearDefault = 30f;
public const bool SlavesBeenRapedExpDefault = true;
public const bool EnableStatRandomizerDefault = true;
+ public const bool EnableBastardRelationDefault = true;
public const float LustLimitDefault = MaxInitialLustDefault / 3f;
public const float MaxSingleLustChangeDefault = 0.5f;
public const bool MinSexableFromLifestageDefault = true;
@@ -26,6 +27,7 @@ namespace RJWSexperience
private float sexPerYear = SexPerYearDefault;
private bool slavesBeenRapedExp = SlavesBeenRapedExpDefault;
private bool enableRecordRandomizer = EnableStatRandomizerDefault;
+ private bool enableBastardRelation = EnableBastardRelationDefault;
private float lustLimit = LustLimitDefault;
private bool minSexableFromLifestage = MinSexableFromLifestageDefault;
private float minSexablePercent = MinSexablePercentDefault;
@@ -39,6 +41,7 @@ namespace RJWSexperience
public float SexPerYear { get => sexPerYear; }
public bool SlavesBeenRapedExp { get => slavesBeenRapedExp; }
public bool EnableRecordRandomizer { get => enableRecordRandomizer; }
+ public bool EnableBastardRelation { get => enableBastardRelation; }
public float LustLimit { get => lustLimit; }
public bool MinSexableFromLifestage { get => minSexableFromLifestage; }
public float MinSexablePercent { get => minSexablePercent; }
@@ -59,6 +62,7 @@ namespace RJWSexperience
sexPerYear = SexPerYearDefault;
slavesBeenRapedExp = SlavesBeenRapedExpDefault;
enableRecordRandomizer = EnableStatRandomizerDefault;
+ enableBastardRelation = EnableBastardRelationDefault;
lustLimit = LustLimitDefault;
maxSingleLustChange = MaxSingleLustChangeDefault;
minSexableFromLifestage = MinSexableFromLifestageDefault;
@@ -75,6 +79,7 @@ namespace RJWSexperience
Scribe_Values.Look(ref sexPerYear, "SexPerYear", SexPerYearDefault, true);
Scribe_Values.Look(ref slavesBeenRapedExp, "SlavesBeenRapedExp", SlavesBeenRapedExpDefault, true);
Scribe_Values.Look(ref enableRecordRandomizer, "EnableRecordRandomizer", EnableStatRandomizerDefault, true);
+ Scribe_Values.Look(ref enableBastardRelation, "EnableBastardRelation", EnableBastardRelationDefault, true);
Scribe_Values.Look(ref lustLimit, "LustLimit", LustLimitDefault, true);
Scribe_Values.Look(ref maxSingleLustChange, "maxSingleLustChange", MaxSingleLustChangeDefault, true);
Scribe_Values.Look(ref minSexableFromLifestage, "MinSexableFromLifestage", MinSexableFromLifestageDefault, true);
@@ -121,6 +126,8 @@ namespace RJWSexperience
listmain.EndSection(section);
}
+ listmain.CheckboxLabeled(Keyed.Option_EnableBastardRelation_Label, ref enableBastardRelation, Keyed.Option_EnableBastardRelation_Desc);
+
if (listmain.ButtonText("reset to default"))
{
ResetToDefault();
diff --git a/RJWSexperience/RJWSexperience/Keyed.cs b/RJWSexperience/RJWSexperience/Keyed.cs
index 8bbd673..706034e 100644
--- a/RJWSexperience/RJWSexperience/Keyed.cs
+++ b/RJWSexperience/RJWSexperience/Keyed.cs
@@ -87,6 +87,8 @@ namespace RJWSexperience
public static readonly string Option_MinSexableFromLifestage_Desc = "RSOption_MinSexableFromLifestage_Desc".Translate();
public static readonly string Option_MaxSingleLustChange_Label = "RSOption_MaxSingleLustChange_Label".Translate();
public static readonly string Option_MaxSingleLustChange_Desc = "RSOption_MaxSingleLustChange_Desc".Translate();
+ public static readonly string Option_EnableBastardRelation_Label = "RSOption_EnableBastardRelation_Label".Translate();
+ public static readonly string Option_EnableBastardRelation_Desc = "RSOption_EnableBastardRelation_Desc".Translate();
public static string Translate(this PartnerOrderMode mode)
{
diff --git a/RJWSexperience/RJWSexperience/PawnRelationWorker_Bastard.cs b/RJWSexperience/RJWSexperience/PawnRelationWorker_Bastard.cs
new file mode 100644
index 0000000..ce110ad
--- /dev/null
+++ b/RJWSexperience/RJWSexperience/PawnRelationWorker_Bastard.cs
@@ -0,0 +1,24 @@
+using RimWorld;
+using Verse;
+
+namespace RJWSexperience
+{
+ public class PawnRelationWorker_Bastard : PawnRelationWorker_Child
+ {
+ public override bool InRelation(Pawn me, Pawn other)
+ {
+ if (!SexperienceMod.Settings.EnableBastardRelation)
+ return false;
+
+ Pawn mother = other.GetMother();
+ Pawn father = other.GetFather();
+ if (me != other && (mother == me || father == me))
+ {
+ if (mother == null || father == null) return true;
+ else if (mother.relations != null) return !(mother.relations.DirectRelationExists(PawnRelationDefOf.Spouse, father) || mother.relations.DirectRelationExists(PawnRelationDefOf.ExSpouse, father));
+ }
+
+ return false;
+ }
+ }
+}
diff --git a/RJWSexperience/RJWSexperience/PawnRelationWorkers.cs b/RJWSexperience/RJWSexperience/PawnRelationWorkers.cs
deleted file mode 100644
index 9125f42..0000000
--- a/RJWSexperience/RJWSexperience/PawnRelationWorkers.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Verse;
-using RimWorld;
-using rjw;
-
-
-namespace RJWSexperience
-{
- public class PawnRelationWorker_Bastard : PawnRelationWorker_Child
- {
- public override bool InRelation(Pawn me, Pawn other)
- {
- Pawn mother = other.GetMother();
- Pawn father = other.GetFather();
- if (me != other && (mother == me || father == me))
- {
- if (mother == null || father == null) return true;
- else if (mother.relations != null) return !(mother.relations.DirectRelationExists(PawnRelationDefOf.Spouse, father) || mother.relations.DirectRelationExists(PawnRelationDefOf.ExSpouse, father));
- }
-
- return false;
- }
- }
-
-
-
-}
diff --git a/RJWSexperience/RJWSexperience/RJWSexperience.csproj b/RJWSexperience/RJWSexperience/RJWSexperience.csproj
index 4b54328..9837a44 100644
--- a/RJWSexperience/RJWSexperience/RJWSexperience.csproj
+++ b/RJWSexperience/RJWSexperience/RJWSexperience.csproj
@@ -82,7 +82,7 @@
-
+