mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Moving the Animal Genetics compatibility to conception rather than birth makes it work again, so officially re-enable support.
This commit is contained in:
		
							parent
							
								
									aa5fd79e62
								
							
						
					
					
						commit
						9e8dcc0540
					
				
					 5 changed files with 6 additions and 7 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -5,7 +5,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public static class AnimalGeneticsCompatibility
 | 
					    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 motherGeneticInformation = mother?.AnimalGenetics();
 | 
				
			||||||
            GeneticInformation fatherGeneticInformation = father?.AnimalGenetics();
 | 
					            GeneticInformation fatherGeneticInformation = father?.AnimalGenetics();
 | 
				
			||||||
| 
						 | 
					@ -19,7 +19,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
            ParentReferences.Push(new ParentReferences.Record { Mother = motherGeneticInformation, Father = fatherGeneticInformation });
 | 
					            ParentReferences.Push(new ParentReferences.Record { Mother = motherGeneticInformation, Father = fatherGeneticInformation });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static void PostBirth()
 | 
					        public static void PostConception()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            ParentReferences.Pop();
 | 
					            ParentReferences.Pop();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,8 +57,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            foreach (Pawn baby in babies)
 | 
					            foreach (Pawn baby in babies)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PreBirth(pawn, Utility.GetFather(baby, pawn), this);
 | 
					 | 
				
			||||||
                
 | 
					 | 
				
			||||||
                if (xxx.is_animal(baby))
 | 
					                if (xxx.is_animal(baby))
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    BestialBirth(baby);
 | 
					                    BestialBirth(baby);
 | 
				
			||||||
| 
						 | 
					@ -68,8 +66,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
                    HumanlikeBirth(baby);
 | 
					                    HumanlikeBirth(baby);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PostBirth();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                baby.ageTracker.AgeChronologicalTicks = 0;
 | 
					                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)
 | 
					        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);
 | 
					            Pawn baby = PawnGenerator.GeneratePawn(request);
 | 
				
			||||||
 | 
					            if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PostConception();
 | 
				
			||||||
            if (baby == null)
 | 
					            if (baby == null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                Log.Error("Baby not generated. Request: " + request.ToString());
 | 
					                Log.Error("Baby not generated. Request: " + request.ToString());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,7 +97,7 @@
 | 
				
			||||||
      <Private>False</Private>
 | 
					      <Private>False</Private>
 | 
				
			||||||
    </Reference>
 | 
					    </Reference>
 | 
				
			||||||
    <Reference Include="AnimalGenetics">
 | 
					    <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>
 | 
					      <Private>False</Private>
 | 
				
			||||||
    </Reference>
 | 
					    </Reference>
 | 
				
			||||||
    <Reference Include="Assembly-CSharp">
 | 
					    <Reference Include="Assembly-CSharp">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,6 +4,7 @@ Version 1.0.7.5
 | 
				
			||||||
 - Properly calculate cramp pain falloff again.
 | 
					 - 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.
 | 
					 - 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.
 | 
					 - 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
 | 
					Version 1.0.7.4
 | 
				
			||||||
 - Fix errors when using other mods with bad HediffCompProperties.
 | 
					 - Fix errors when using other mods with bad HediffCompProperties.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue