mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Put a warning in the log when loading a pregnancy with mother == father
This commit is contained in:
		
							parent
							
								
									4be4d881d5
								
							
						
					
					
						commit
						f70c2ad585
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -639,10 +639,14 @@ namespace RJW_Menstruation
 | 
				
			||||||
            if (Scribe.mode == LoadSaveMode.PostLoadInit)
 | 
					            if (Scribe.mode == LoadSaveMode.PostLoadInit)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                Initialize();
 | 
					                Initialize();
 | 
				
			||||||
                if (pregnancy is HediffWithParents vanillaPreg && vanillaPreg.Mother == vanillaPreg.Father)   // Fix mother == father issue
 | 
					                // Biotech labor errors if the mother is also the father, so don't let that happen
 | 
				
			||||||
 | 
					                if (pregnancy is HediffWithParents vanillaPreg && vanillaPreg.Mother == vanillaPreg.Father && vanillaPreg.Mother != null)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    Log.Warning($"Pregnancy of {Pawn} has same mother and father, setting father to null");
 | 
				
			||||||
                    vanillaPreg.SetParents(vanillaPreg.Mother, null, vanillaPreg.geneSet);
 | 
					                    vanillaPreg.SetParents(vanillaPreg.Mother, null, vanillaPreg.geneSet);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public override void CompPostPostAdd(DamageInfo? dinfo)
 | 
					        public override void CompPostPostAdd(DamageInfo? dinfo)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue