Eliminate egg if there is an error implanting it.

This commit is contained in:
lutepickle 2023-07-29 14:42:46 -07:00
parent f0c971eba0
commit 0c38513084
4 changed files with 70 additions and 59 deletions

Binary file not shown.

View File

@ -1413,6 +1413,8 @@ namespace RJW_Menstruation
continue;
}
else if (Rand.Chance(Configurations.ImplantationChance * ImplantChance * InterspeciesImplantFactor(egg.fertilizer)))
{
try
{
if (Configurations.Debug) Log.Message($"Implanting fertilized egg of {Pawn} into {parent}, father {egg.fertilizer}");
if (pregnancy != null)
@ -1487,12 +1489,18 @@ namespace RJW_Menstruation
}
}
}
catch (Exception ex)
{
Log.Error($"Error creating pregnancy in {Pawn}'s womb, father {egg.fertilizer}: {ex}");
deadeggs.Add(egg);
}
}
else
{
if (Configurations.Debug)
{
float implantChance = Configurations.ImplantationChance * ImplantChance * InterspeciesImplantFactor(egg.fertilizer);
Log.Message($"Fertilized egg of {Pawn} failed to implant (chance {implantChance.ToStringPercent()}, father {egg.fertilizer})");
if (Configurations.Debug) Log.Message($"Fertilized egg of {Pawn} failed to implant (chance {implantChance.ToStringPercent()}, father {egg.fertilizer})");
}
deadeggs.Add(egg);
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>RJW Menstruation</identifier>
<version>1.0.9.1</version>
<version>1.0.9.2</version>
<dependencies>
</dependencies>
<incompatibleWith />

View File

@ -1,3 +1,6 @@
Version 1.0.9.2
- Prevent repeated pregnancies when some errors occur.
Version 1.0.9.1
- Japanese translation for most text by Lokuzt.
- New womb, cum, and fetus graphics by Euldrop.