Moving the Animal Genetics compatibility to conception rather than birth makes it work again, so officially re-enable support.

This commit is contained in:
lutepickle 2022-09-22 22:47:55 -07:00
parent aa5fd79e62
commit 9e8dcc0540
5 changed files with 6 additions and 7 deletions

Binary file not shown.

View File

@ -5,7 +5,7 @@ namespace RJW_Menstruation
{
public static class AnimalGeneticsCompatibility
{
public static void PreBirth(Pawn mother, Pawn father, Hediff_MultiplePregnancy pregnancy)
public static void PreConception(Pawn mother, Pawn father, Hediff_MultiplePregnancy pregnancy)
{
GeneticInformation motherGeneticInformation = mother?.AnimalGenetics();
GeneticInformation fatherGeneticInformation = father?.AnimalGenetics();
@ -19,7 +19,7 @@ namespace RJW_Menstruation
ParentReferences.Push(new ParentReferences.Record { Mother = motherGeneticInformation, Father = fatherGeneticInformation });
}
public static void PostBirth()
public static void PostConception()
{
ParentReferences.Pop();
}

View File

@ -57,8 +57,6 @@ namespace RJW_Menstruation
foreach (Pawn baby in babies)
{
if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PreBirth(pawn, Utility.GetFather(baby, pawn), this);
if (xxx.is_animal(baby))
{
BestialBirth(baby);
@ -68,8 +66,6 @@ namespace RJW_Menstruation
HumanlikeBirth(baby);
}
if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PostBirth();
baby.ageTracker.AgeChronologicalTicks = 0;
}
@ -473,7 +469,9 @@ namespace RJW_Menstruation
public Pawn GenerateBaby(PawnGenerationRequest request, Pawn mother, Pawn father, List<Trait> parentTraits, int traitSeed)
{
if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PreConception(mother, father, this);
Pawn baby = PawnGenerator.GeneratePawn(request);
if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PostConception();
if (baby == null)
{
Log.Error("Baby not generated. Request: " + request.ToString());

View File

@ -97,7 +97,7 @@
<Private>False</Private>
</Reference>
<Reference Include="AnimalGenetics">
<HintPath>..\..\..\..\..\..\..\..\workshop\content\294100\2226725974\1.3\Assemblies\AnimalGenetics.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\..\workshop\content\294100\2830943477\1.3\Assemblies\AnimalGenetics.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">

View File

@ -4,6 +4,7 @@ Version 1.0.7.5
- Properly calculate cramp pain falloff again.
- Climacteric and menopause are now per-womb, appearing in the womb dialog instead of as hediffs. Any old hediffs should disappear upon loading the save.
- Added new property to vaginas to multiply the number of eggs available. Archotech vaginas will have quadruple the normal amount.
- Support for Animal Genetics (Continued) when using multiple pregnancy.
Version 1.0.7.4
- Fix errors when using other mods with bad HediffCompProperties.