diff --git a/1.3/Assemblies/RJW_Menstruation.dll b/1.3/Assemblies/RJW_Menstruation.dll index 8bc8f72..aa1061c 100644 Binary files a/1.3/Assemblies/RJW_Menstruation.dll and b/1.3/Assemblies/RJW_Menstruation.dll differ diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs index 134e7b0..1e0b9ca 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs @@ -125,9 +125,23 @@ namespace RJW_Menstruation if (mother.Faction != baby.Faction) baby.SetFaction(mother.Faction); } - if (mother.IsPrisonerOfColony) + if (mother.IsSlaveOfColony) { - baby.guest.CapturedBy(Faction.OfPlayer); + if (mother.SlaveFaction != null) + baby.SetFaction(mother.SlaveFaction); + else if (mother.HomeFaction != null) + baby.SetFaction(mother.HomeFaction); + else if (mother.Faction != null) + baby.SetFaction(mother.Faction); + else + baby.SetFaction(Faction.OfPlayer); + baby.guest.SetGuestStatus(Faction.OfPlayer, GuestStatus.Slave); + } + else if (mother.IsPrisonerOfColony) + { + if (mother.HomeFaction != null) + baby.SetFaction(mother.HomeFaction); + baby.guest.SetGuestStatus(Faction.OfPlayer, GuestStatus.Prisoner); } foreach (Pawn sibling in siblings) @@ -159,13 +173,15 @@ namespace RJW_Menstruation if (mother.Faction != baby.Faction) baby.SetFaction(mother.Faction); } - - foreach (Pawn sibling in siblings) + if (!RJWSettings.Disable_bestiality_pregnancy_relations) { - baby.relations.AddDirectRelation(PawnRelationDefOf.Sibling, sibling); + foreach (Pawn sibling in siblings) + { + baby.relations.AddDirectRelation(PawnRelationDefOf.Sibling, sibling); + } + siblings.Add(baby); } - siblings.Add(baby); Train(baby, mother); PostBirth(mother, father, baby); @@ -324,7 +340,7 @@ namespace RJW_Menstruation PawnGenerationRequest request = new PawnGenerationRequest( newborn: true, allowDowned: true, - faction: mother.IsPrisoner ? null : mother.Faction, + faction: mother.Faction, canGeneratePawnRelations: false, forceGenerateNewPawn: true, colonistRelationChanceFactor: 0, @@ -425,7 +441,7 @@ namespace RJW_Menstruation UpdateTraits(baby, parentTraits); Rand.PopState(); } - else if (baby.relations != null) + else if (baby.relations != null && !RJWSettings.Disable_bestiality_pregnancy_relations) { baby.relations.AddDirectRelation(VariousDefOf.Relation_birthgiver, mother); mother.relations.AddDirectRelation(VariousDefOf.Relation_spawn, baby); diff --git a/changelogs.txt b/changelogs.txt index d80ea86..50253ba 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -3,6 +3,8 @@ Version 1.0.6.1 - Fix errors when a hybrid refers to an invalid race. - A pawn in estrus will prefer partners and sex types that would result in pregnancy. - Optional (default disabled) alternative casual hookup settings for a pawn in visible estrus. + - Babies born to slaves will have the right faction. + - Respect RJW's bestiality pregnancy relations setting. - Contributed by amevarashi: - Fix womb cleaning job if no buckets on the map.