Compare commits

...

3 commits

Author SHA1 Message Date
lutepickle
08ebaa9db3 Unconditionally initialize cum and eggs (e.g. for infertile pawns) 2023-04-16 12:26:37 -07:00
lutepickle
4af5195de9 Give eggs the proper lifetime 2023-04-16 12:20:01 -07:00
lutepickle
eddccdc2ea Remove some force saves from Egg 2023-04-15 12:15:15 -07:00
2 changed files with 7 additions and 7 deletions

Binary file not shown.

View file

@ -1140,11 +1140,13 @@ namespace RJW_Menstruation
initError = true; initError = true;
Props = (CompProperties_Menstruation)props; Props = (CompProperties_Menstruation)props;
if (cums == null) cums = new List<Cum>();
if (eggs == null) eggs = new List<Egg>();
Notify_UpdatedGenes(); Notify_UpdatedGenes();
if (Props.infertile) if (Props.infertile)
{ {
if (cums == null) cums = new List<Cum>();
curStage = Stage.None; curStage = Stage.None;
loaded = true; loaded = true;
initError = false; initError = false;
@ -1170,8 +1172,6 @@ namespace RJW_Menstruation
} }
if (crampPain < 0) crampPain = PainRandomizer(); if (crampPain < 0) crampPain = PainRandomizer();
InitializeExtraValues(); InitializeExtraValues();
if (cums == null) cums = new List<Cum>();
if (eggs == null) eggs = new List<Egg>();
TakeLoosePregnancy(); TakeLoosePregnancy();
@ -1968,10 +1968,10 @@ namespace RJW_Menstruation
ageTicks = 0; ageTicks = 0;
} }
public Egg(int lifespanhrs) public Egg(int lifespanticks)
{ {
fertilized = false; fertilized = false;
lifeSpanTicks = (int)(lifespanhrs * GenDate.TicksPerHour * Configurations.EggLifespanMultiplier); lifeSpanTicks = (int)(lifespanticks * Configurations.EggLifespanMultiplier);
fertilizer = null; fertilizer = null;
ageTicks = 0; ageTicks = 0;
} }
@ -1991,10 +1991,10 @@ namespace RJW_Menstruation
if (fertstage >= 0) ticksSinceFertilization = fertstage * GenDate.TicksPerHour; if (fertstage >= 0) ticksSinceFertilization = fertstage * GenDate.TicksPerHour;
} }
Scribe_References.Look(ref fertilizer, "fertilizer", true); Scribe_References.Look(ref fertilizer, "fertilizer", true);
Scribe_Values.Look(ref fertilized, "fertilized", fertilized, true); Scribe_Values.Look(ref fertilized, "fertilized", false);
Scribe_Values.Look(ref lifeSpanTicks, "lifeSpanTicks", lifeSpanTicks, true); Scribe_Values.Look(ref lifeSpanTicks, "lifeSpanTicks", lifeSpanTicks, true);
Scribe_Values.Look(ref ageTicks, "ageTicks", ageTicks, true); Scribe_Values.Look(ref ageTicks, "ageTicks", ageTicks, true);
Scribe_Values.Look(ref ticksSinceFertilization, "ticksSinceFertilization", ticksSinceFertilization, true); Scribe_Values.Look(ref ticksSinceFertilization, "ticksSinceFertilization", 0);
} }
} }