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,8 +639,12 @@ namespace RJW_Menstruation
|
|||
if (Scribe.mode == LoadSaveMode.PostLoadInit)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue