mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Little refactor to ovulation egging
This commit is contained in:
parent
7f306fb9c7
commit
c081e1e9b9
1 changed files with 5 additions and 8 deletions
|
@ -1390,11 +1390,10 @@ namespace RJW_Menstruation
|
||||||
protected virtual void OvulatoryAction()
|
protected virtual void OvulatoryAction()
|
||||||
{
|
{
|
||||||
estrusflag = false;
|
estrusflag = false;
|
||||||
int i = 0;
|
int eggnum;
|
||||||
float eggnum;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
eggnum = Rand.ByCurve(Pawn.def.race.litterSizeCurve);
|
eggnum = Math.Min((int)Rand.ByCurve(Pawn.def.race.litterSizeCurve), 1);
|
||||||
}
|
}
|
||||||
catch (NullReferenceException)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
|
@ -1407,12 +1406,10 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
eggnum += eggstack;
|
eggnum += eggstack;
|
||||||
|
|
||||||
do
|
for (int i = 0; i < eggnum; i++)
|
||||||
{
|
|
||||||
ovarypower--;
|
|
||||||
eggs.Add(new Egg((int)(Props.eggLifespanDays * 24 / CycleFactor)));
|
eggs.Add(new Egg((int)(Props.eggLifespanDays * 24 / CycleFactor)));
|
||||||
i++;
|
ovarypower -= eggnum;
|
||||||
} while (i < (int)eggnum);
|
|
||||||
eggstack = 0;
|
eggstack = 0;
|
||||||
if (EggHealth <= 0)
|
if (EggHealth <= 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue