mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
fertilized stage is merged into luteal stage
This commit is contained in:
parent
c73475497b
commit
26c5d44d8a
3 changed files with 20 additions and 15 deletions
Binary file not shown.
|
@ -20,27 +20,27 @@
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
<label>unpleasant</label>
|
<label>unpleasant</label>
|
||||||
<painOffset>0.05</painOffset>
|
<painOffset>0.05</painOffset>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<minSeverity>0.2</minSeverity>
|
<minSeverity>0.2</minSeverity>
|
||||||
<label>annoy</label>
|
<label>annoy</label>
|
||||||
<painOffset>0.1</painOffset>
|
<painOffset>0.1</painOffset>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<minSeverity>0.4</minSeverity>
|
<minSeverity>0.4</minSeverity>
|
||||||
<label>ache</label>
|
<label>ache</label>
|
||||||
<painOffset>0.2</painOffset>
|
<painOffset>0.2</painOffset>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<minSeverity>0.6</minSeverity>
|
<minSeverity>0.6</minSeverity>
|
||||||
<label>painful</label>
|
<label>painful</label>
|
||||||
<painOffset>0.4</painOffset>
|
<painOffset>0.4</painOffset>
|
||||||
</li>
|
</li>
|
||||||
</stages>
|
</stages>
|
||||||
<comps>
|
<comps>
|
||||||
<li Class="HediffCompProperties_SeverityPerDay">
|
<li Class="HediffCompProperties_SeverityPerDay">
|
||||||
<severityPerDay>-0.1</severityPerDay>
|
<severityPerDay>-0.1</severityPerDay>
|
||||||
</li>
|
</li>
|
||||||
</comps>
|
</comps>
|
||||||
</HediffDef>
|
</HediffDef>
|
||||||
|
|
|
@ -545,7 +545,7 @@ namespace RJW_Menstruation
|
||||||
bool pregnant = false;
|
bool pregnant = false;
|
||||||
foreach(Egg egg in eggs)
|
foreach(Egg egg in eggs)
|
||||||
{
|
{
|
||||||
if (!egg.fertilized) continue;
|
if (egg.position < 24 || !egg.fertilized) continue;
|
||||||
else if (Rand.Range(0.0f, 1.0f) <= Configurations.ImplantationChance * Props.baseImplantationChanceFactor * ImplantFactor * InterspeciesImplantFactor(egg.fertilizer))
|
else if (Rand.Range(0.0f, 1.0f) <= Configurations.ImplantationChance * Props.baseImplantationChanceFactor * ImplantFactor * InterspeciesImplantFactor(egg.fertilizer))
|
||||||
{
|
{
|
||||||
PregnancyHelper.PregnancyDecider(parent.pawn, egg.fertilizer);
|
PregnancyHelper.PregnancyDecider(parent.pawn, egg.fertilizer);
|
||||||
|
@ -592,7 +592,8 @@ namespace RJW_Menstruation
|
||||||
List<Egg> deadeggs = new List<Egg>();
|
List<Egg> deadeggs = new List<Egg>();
|
||||||
foreach (Egg egg in eggs)
|
foreach (Egg egg in eggs)
|
||||||
{
|
{
|
||||||
egg.lifespanhrs--;
|
egg.lifespanhrs -= Configurations.CycleAcceleration;
|
||||||
|
egg.position += Configurations.CycleAcceleration;
|
||||||
if (egg.lifespanhrs < 0) deadeggs.Add(egg);
|
if (egg.lifespanhrs < 0) deadeggs.Add(egg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -639,20 +640,19 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
if (!eggs.NullOrEmpty())
|
if (!eggs.NullOrEmpty())
|
||||||
{
|
{
|
||||||
if (FertilizationCheck())
|
EggDecay();
|
||||||
{
|
FertilizationCheck();
|
||||||
GoNextStage(Stage.Fertilized);
|
if (Implant()) GoNextStage(Stage.Pregnant);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
curStageHrs+=Configurations.CycleAcceleration;
|
curStageHrs += Configurations.CycleAcceleration;
|
||||||
StayCurrentStage();
|
StayCurrentStage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (curStageHrs <= lutealIntervalhours)
|
else if (curStageHrs <= lutealIntervalhours)
|
||||||
{
|
{
|
||||||
curStageHrs+=Configurations.CycleAcceleration;
|
curStageHrs+=Configurations.CycleAcceleration;
|
||||||
StayCurrentStage();
|
StayCurrentStage();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -668,6 +668,8 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_MenstrualCramp, parent.pawn);
|
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_MenstrualCramp, parent.pawn);
|
||||||
hediff.Severity = crampPain * Rand.Range(0.9f, 1.1f);
|
hediff.Severity = crampPain * Rand.Range(0.9f, 1.1f);
|
||||||
|
HediffCompProperties_SeverityPerDay Prop = (HediffCompProperties_SeverityPerDay)hediff.TryGetComp<HediffComp_SeverityPerDay>().props;
|
||||||
|
Prop.severityPerDay = - hediff.Severity / (bleedingIntervalhours/24) * Configurations.CycleAcceleration;
|
||||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||||
}
|
}
|
||||||
GoNextStage(Stage.Bleeding);
|
GoNextStage(Stage.Bleeding);
|
||||||
|
@ -691,7 +693,7 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case Stage.Fertilized:
|
case Stage.Fertilized: //Obsoleted stage. merged in luteal stage
|
||||||
action = delegate
|
action = delegate
|
||||||
{
|
{
|
||||||
if (curStageHrs >= 24)
|
if (curStageHrs >= 24)
|
||||||
|
@ -750,7 +752,6 @@ namespace RJW_Menstruation
|
||||||
action += () =>
|
action += () =>
|
||||||
{
|
{
|
||||||
CumOut();
|
CumOut();
|
||||||
if (!eggs.NullOrEmpty()) EggDecay();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
actionref = action;
|
actionref = action;
|
||||||
|
@ -833,12 +834,14 @@ namespace RJW_Menstruation
|
||||||
public bool fertilized;
|
public bool fertilized;
|
||||||
public int lifespanhrs;
|
public int lifespanhrs;
|
||||||
public Pawn fertilizer;
|
public Pawn fertilizer;
|
||||||
|
public int position;
|
||||||
|
|
||||||
public Egg()
|
public Egg()
|
||||||
{
|
{
|
||||||
fertilized = false;
|
fertilized = false;
|
||||||
lifespanhrs = 96;
|
lifespanhrs = 96;
|
||||||
fertilizer = null;
|
fertilizer = null;
|
||||||
|
position = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Egg(int lifespanhrs)
|
public Egg(int lifespanhrs)
|
||||||
|
@ -846,6 +849,7 @@ namespace RJW_Menstruation
|
||||||
fertilized = false;
|
fertilized = false;
|
||||||
this.lifespanhrs = lifespanhrs;
|
this.lifespanhrs = lifespanhrs;
|
||||||
fertilizer = null;
|
fertilizer = null;
|
||||||
|
position = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExposeData()
|
public void ExposeData()
|
||||||
|
@ -853,6 +857,7 @@ namespace RJW_Menstruation
|
||||||
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", fertilized, true);
|
||||||
Scribe_Values.Look(ref lifespanhrs, "lifespanhrs", lifespanhrs, true);
|
Scribe_Values.Look(ref lifespanhrs, "lifespanhrs", lifespanhrs, true);
|
||||||
|
Scribe_Values.Look(ref position, "position", position, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue