mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
1.0.1.9
This commit is contained in:
parent
69fd540562
commit
9e41472468
10 changed files with 163 additions and 26 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Manifest>
|
||||
<identifier>RJW Menstruation</identifier>
|
||||
<version>1.0.1.8</version>
|
||||
<version>1.0.1.9</version>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<incompatibleWith />
|
||||
|
|
Binary file not shown.
|
@ -6,7 +6,6 @@
|
|||
<label>In period</label>
|
||||
<labelNoun>in period</labelNoun>
|
||||
<description>in period</description>
|
||||
<labelNounPretty>{1} in period</labelNounPretty>
|
||||
<defaultLabelColor>(0.70,0.00,0.00)</defaultLabelColor>
|
||||
<isBad>true</isBad>
|
||||
<tendable>false</tendable>
|
||||
|
@ -67,12 +66,12 @@
|
|||
<label>Menopause</label>
|
||||
<labelNoun>menopause</labelNoun>
|
||||
<description>reached menopause</description>
|
||||
<labelNounPretty>{1} reached menopause</labelNounPretty>
|
||||
<labelNounPretty>{0} reached menopause</labelNounPretty>
|
||||
<defaultLabelColor>(0.70,0.70,0.00)</defaultLabelColor>
|
||||
<isBad>false</isBad>
|
||||
<tendable>false</tendable>
|
||||
<makesSickThought>false</makesSickThought>
|
||||
<makesAlert>false</makesAlert>
|
||||
<makesAlert>true</makesAlert>
|
||||
<maxSeverity>1</maxSeverity>
|
||||
<initialSeverity>0.1</initialSeverity>
|
||||
<injuryProps>
|
||||
|
@ -102,12 +101,11 @@
|
|||
<label>Climacteric</label>
|
||||
<labelNoun>climacteric</labelNoun>
|
||||
<description>climacteric</description>
|
||||
<labelNounPretty>{1} climacteric</labelNounPretty>
|
||||
<defaultLabelColor>(0.70,0.70,0.00)</defaultLabelColor>
|
||||
<isBad>false</isBad>
|
||||
<tendable>false</tendable>
|
||||
<makesSickThought>false</makesSickThought>
|
||||
<makesAlert>true</makesAlert>
|
||||
<makesAlert>false</makesAlert>
|
||||
<maxSeverity>1</maxSeverity>
|
||||
<initialSeverity>0.1</initialSeverity>
|
||||
<injuryProps>
|
||||
|
@ -175,5 +173,67 @@
|
|||
</HediffDef>
|
||||
|
||||
|
||||
<HediffDef Name="Hediff_Estrus">
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<defName>Hediff_Estrus</defName>
|
||||
<label>Estrus</label>
|
||||
<labelNoun>estrus</labelNoun>
|
||||
<description>estrus</description>
|
||||
<defaultLabelColor>(1.00,0.60,0.75)</defaultLabelColor>
|
||||
<isBad>false</isBad>
|
||||
<tendable>false</tendable>
|
||||
<makesSickThought>false</makesSickThought>
|
||||
<makesAlert>false</makesAlert>
|
||||
<maxSeverity>10000</maxSeverity>
|
||||
<initialSeverity>1.0</initialSeverity>
|
||||
<injuryProps>
|
||||
<canMerge>true</canMerge>
|
||||
</injuryProps>
|
||||
<stages>
|
||||
<li>
|
||||
<statFactors>
|
||||
<SexFrequency>5.0</SexFrequency>
|
||||
<SexSatisfaction>1.5</SexSatisfaction>
|
||||
</statFactors>
|
||||
</li>
|
||||
</stages>
|
||||
<comps>
|
||||
<li Class="HediffCompProperties_SeverityPerDay">
|
||||
<severityPerDay>-1.0</severityPerDay>
|
||||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
||||
<HediffDef Name="Hediff_Estrus_Consealed">
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<defName>Hediff_Estrus_Consealed</defName>
|
||||
<label>Estrus(consealed)</label>
|
||||
<labelNoun>estrus</labelNoun>
|
||||
<description>estrus</description>
|
||||
<defaultLabelColor>(1.00,0.60,0.75)</defaultLabelColor>
|
||||
<isBad>false</isBad>
|
||||
<tendable>false</tendable>
|
||||
<makesSickThought>false</makesSickThought>
|
||||
<makesAlert>false</makesAlert>
|
||||
<maxSeverity>10000</maxSeverity>
|
||||
<initialSeverity>1.0</initialSeverity>
|
||||
<injuryProps>
|
||||
<canMerge>true</canMerge>
|
||||
</injuryProps>
|
||||
<stages>
|
||||
<li>
|
||||
<becomeVisible>false</becomeVisible>
|
||||
<statFactors>
|
||||
<SexFrequency>1.10</SexFrequency>
|
||||
<SexSatisfaction>1.05</SexSatisfaction>
|
||||
</statFactors>
|
||||
</li>
|
||||
</stages>
|
||||
<comps>
|
||||
<li Class="HediffCompProperties_SeverityPerDay">
|
||||
<severityPerDay>-1.0</severityPerDay>
|
||||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
||||
</Defs>
|
|
@ -14,6 +14,10 @@
|
|||
<Hediff_Climacteric.stages.3.label>폐경</Hediff_Climacteric.stages.3.label>
|
||||
<Hediff_Menopause.label>폐경</Hediff_Menopause.label>
|
||||
<Hediff_Menopause.description>임신할수 없습니다.</Hediff_Menopause.description>
|
||||
<Hediff_Estrus.label>발정기</Hediff_Estrus.label>
|
||||
<Hediff_Estrus.description>발정기입니다.</Hediff_Estrus.description>
|
||||
<Hediff_Estrus_Consealed.label>발정기(숨김)</Hediff_Estrus_Consealed.label>
|
||||
<Hediff_Estrus_Consealed.description>발정기입니다.</Hediff_Estrus_Consealed.description>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -20,11 +20,12 @@
|
|||
<folicularIntervalDays>14</folicularIntervalDays>
|
||||
<lutealIntervalDays>14</lutealIntervalDays>
|
||||
<bleedingIntervalDays>6</bleedingIntervalDays>
|
||||
<recoveryIntervalDays>10</recoveryIntervalDays>
|
||||
<recoveryIntervalDays>30</recoveryIntervalDays>
|
||||
<eggLifespanDays>3</eggLifespanDays>
|
||||
<wombTex>Womb/Womb</wombTex>
|
||||
<vagTex>Genitals/Vagina</vagTex>
|
||||
<ovaryPower>420</ovaryPower>
|
||||
<consealedEstrus>true</consealedEstrus>
|
||||
</li>
|
||||
</comps>
|
||||
</value>
|
||||
|
@ -62,8 +63,8 @@
|
|||
<deviationFactor>0.05</deviationFactor>
|
||||
<folicularIntervalDays>14</folicularIntervalDays>
|
||||
<lutealIntervalDays>14</lutealIntervalDays>
|
||||
<bleedingIntervalDays>6</bleedingIntervalDays>
|
||||
<recoveryIntervalDays>10</recoveryIntervalDays>
|
||||
<bleedingIntervalDays>0</bleedingIntervalDays>
|
||||
<recoveryIntervalDays>30</recoveryIntervalDays>
|
||||
<eggLifespanDays>3</eggLifespanDays>
|
||||
<wombTex>Womb/Womb</wombTex>
|
||||
<vagTex>Genitals/Vagina</vagTex>
|
||||
|
@ -106,8 +107,8 @@
|
|||
<comps>
|
||||
<li Class="RJW_Menstruation.CompProperties_Menstruation">
|
||||
<maxCumCapacity>10</maxCumCapacity>
|
||||
<baseImplantationChanceFactor>1.0</baseImplantationChanceFactor>
|
||||
<basefertilizationChanceFactor>1.0</basefertilizationChanceFactor>
|
||||
<baseImplantationChanceFactor>2.0</baseImplantationChanceFactor>
|
||||
<basefertilizationChanceFactor>2.0</basefertilizationChanceFactor>
|
||||
<deviationFactor>0.05</deviationFactor>
|
||||
<folicularIntervalDays>14</folicularIntervalDays>
|
||||
<lutealIntervalDays>14</lutealIntervalDays>
|
||||
|
@ -116,6 +117,7 @@
|
|||
<eggLifespanDays>3</eggLifespanDays>
|
||||
<wombTex>Womb/Womb</wombTex>
|
||||
<vagTex>Genitals/Vagina</vagTex>
|
||||
<consealedEstrus>true</consealedEstrus>
|
||||
</li>
|
||||
</comps>
|
||||
</value>
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
Version 1.0.1.9
|
||||
- add estrus effects
|
||||
- estrus increases pawn's sex drive greatly
|
||||
- add consealedEstrus attribute to CompProperties_Menstruation
|
||||
- if consealedEstrus set as true, the pawn will get less effective estrus
|
||||
- hyperfertility pills induce esturs
|
||||
- now initial ovarypower is affected by pawn's life expectancy and litter size
|
||||
|
||||
Version 1.0.1.8
|
||||
- fixed problems with animal status window
|
||||
- fixed RMB menu crash
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace RJW_Menstruation
|
|||
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.ClimactericLuteal)
|
||||
))
|
||||
{
|
||||
comp.SetEstrus(comp.Props.eggLifespanDays);
|
||||
comp.curStage = HediffComp_Menstruation.Stage.Ovulatory;
|
||||
comp.ovarypower--;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace RJW_Menstruation
|
|||
public string vagTex = "Genitals/Vagina"; //fertiledays = ovaluationday - spermlifespan ~ ovaluationday + egglifespanday
|
||||
public bool infertile = false;
|
||||
public int ovaryPower = 600000000; // default: almost unlimited ovulation
|
||||
public bool consealedEstrus = false;
|
||||
|
||||
public CompProperties_Menstruation()
|
||||
{
|
||||
|
@ -54,7 +55,7 @@ namespace RJW_Menstruation
|
|||
public class HediffComp_Menstruation : HediffComp
|
||||
{
|
||||
const float minmakefilthvalue = 1.0f;
|
||||
const int ovarypowerthreshold = 72;
|
||||
//const int ovarypowerthreshold = 72;
|
||||
|
||||
public static readonly int tickInterval = 2500; // an hour
|
||||
public CompProperties_Menstruation Props;
|
||||
|
@ -92,6 +93,25 @@ namespace RJW_Menstruation
|
|||
private Need sexNeed = null;
|
||||
private string customwombtex = null;
|
||||
private string customvagtex = null;
|
||||
private bool estrusflag = false;
|
||||
private int opcache = -1;
|
||||
|
||||
public int ovarypowerthreshold
|
||||
{
|
||||
get
|
||||
{
|
||||
if (opcache < 0) opcache = (int)(72f * ThingDefOf.Human.race.lifeExpectancy / parent.pawn.def.race.lifeExpectancy);
|
||||
return opcache;
|
||||
}
|
||||
}
|
||||
|
||||
public int FollicularIntervalHours
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)((follicularIntervalhours - bleedingIntervalhours) * CycleFactor);
|
||||
}
|
||||
}
|
||||
|
||||
public float TotalCum
|
||||
{
|
||||
|
@ -383,6 +403,7 @@ namespace RJW_Menstruation
|
|||
Scribe_Values.Look(ref crampPain, "crampPain", crampPain, true);
|
||||
Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true);
|
||||
Scribe_Values.Look(ref eggstack, "eggstack", eggstack, true);
|
||||
Scribe_Values.Look(ref estrusflag, "estrusflag", estrusflag, true);
|
||||
|
||||
|
||||
}
|
||||
|
@ -863,19 +884,33 @@ namespace RJW_Menstruation
|
|||
}
|
||||
else if (ovarypower < -50000)
|
||||
{
|
||||
ovarypower = (int)(Props.ovaryPower * Rand.Range(0.7f, 1.3f)) - (Math.Max(0, parent.pawn.ageTracker.AgeBiologicalYears - 15)) * (60 / (Props.folicularIntervalDays + Props.lutealIntervalDays) * Configurations.CycleAcceleration);
|
||||
if (ovarypower < 1)
|
||||
if (Props.ovaryPower > 10000000) ovarypower = Props.ovaryPower;
|
||||
else
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, parent.pawn);
|
||||
hediff.Severity = 0.2f;
|
||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||
curStage = Stage.Young;
|
||||
}
|
||||
else if (ovarypower < ovarypowerthreshold)
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Climacteric, parent.pawn);
|
||||
hediff.Severity = 0.008f * (ovarypowerthreshold - ovarypower);
|
||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||
float avglittersize;
|
||||
try
|
||||
{
|
||||
avglittersize = Rand.ByCurveAverage(parent.pawn.def.race.litterSizeCurve);
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
avglittersize = 1;
|
||||
}
|
||||
ovarypower = (int)(((Props.ovaryPower * Rand.Range(0.7f, 1.3f) * parent.pawn.def.race.lifeExpectancy / ThingDefOf.Human.race.lifeExpectancy)
|
||||
- (Math.Max(0, parent.pawn.ageTracker.AgeBiologicalYears - 15)) * (60 / (Props.folicularIntervalDays + Props.lutealIntervalDays) * Configurations.CycleAcceleration)) * avglittersize);
|
||||
if (ovarypower < 1)
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, parent.pawn);
|
||||
hediff.Severity = 0.2f;
|
||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||
curStage = Stage.Young;
|
||||
}
|
||||
else if (ovarypower < ovarypowerthreshold)
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Climacteric, parent.pawn);
|
||||
hediff.Severity = 0.008f * (ovarypowerthreshold - ovarypower);
|
||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -916,6 +951,25 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
public void SetEstrus(int days)
|
||||
{
|
||||
HediffDef estrusdef;
|
||||
if (Props.consealedEstrus) estrusdef = VariousDefOf.Hediff_Estrus_Consealed;
|
||||
else estrusdef = VariousDefOf.Hediff_Estrus;
|
||||
|
||||
HediffWithComps hediff = (HediffWithComps)parent.pawn.health.hediffSet.GetFirstHediffOfDef(estrusdef);
|
||||
if (hediff != null)
|
||||
{
|
||||
hediff.Severity = (float)days / Configurations.CycleAcceleration + 0.2f;
|
||||
}
|
||||
else
|
||||
{
|
||||
hediff = (HediffWithComps)HediffMaker.MakeHediff(estrusdef, parent.pawn);
|
||||
hediff.Severity = (float)days / Configurations.CycleAcceleration + 0.2f;
|
||||
parent.pawn.health.AddHediff(hediff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private Pawn Fertilize()
|
||||
{
|
||||
|
@ -1103,13 +1157,18 @@ namespace RJW_Menstruation
|
|||
case Stage.Follicular:
|
||||
action = delegate
|
||||
{
|
||||
if (curStageHrs >= (follicularIntervalhours - bleedingIntervalhours) * CycleFactor)
|
||||
if (curStageHrs >= FollicularIntervalHours)
|
||||
{
|
||||
GoNextStage(Stage.Ovulatory);
|
||||
}
|
||||
else
|
||||
{
|
||||
curStageHrs+=Configurations.CycleAcceleration;
|
||||
if (!estrusflag && curStageHrs > FollicularIntervalHours - 72)
|
||||
{
|
||||
estrusflag = true;
|
||||
SetEstrus(Props.eggLifespanDays + 3);
|
||||
}
|
||||
StayCurrentStage();
|
||||
}
|
||||
};
|
||||
|
@ -1117,6 +1176,7 @@ namespace RJW_Menstruation
|
|||
case Stage.Ovulatory:
|
||||
action = delegate
|
||||
{
|
||||
estrusflag = false;
|
||||
int i = 0;
|
||||
do
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace RJW_Menstruation
|
|||
|
||||
foreach (LocalTargetInfo t in selftargets)
|
||||
{
|
||||
if (Utility.HasMenstruationComp(pawn)) opts.AddDistinct(MakeSelfMenu(pawn, t));
|
||||
if (pawn.HasMenstruationComp()) opts.AddDistinct(MakeSelfMenu(pawn, t));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ namespace RJW_Menstruation
|
|||
public static readonly HediffDef Hediff_MenstrualCramp = DefDatabase<HediffDef>.GetNamed("Hediff_MenstrualCramp");
|
||||
public static readonly HediffDef Hediff_Climacteric = DefDatabase<HediffDef>.GetNamed("Hediff_Climacteric");
|
||||
public static readonly HediffDef Hediff_Menopause = DefDatabase<HediffDef>.GetNamed("Hediff_Menopause");
|
||||
public static readonly HediffDef Hediff_Estrus = DefDatabase<HediffDef>.GetNamed("Hediff_Estrus");
|
||||
public static readonly HediffDef Hediff_Estrus_Consealed = DefDatabase<HediffDef>.GetNamed("Hediff_Estrus_Consealed");
|
||||
public static readonly StatDef MaxAbsorbable = DefDatabase<StatDef>.GetNamed("MaxAbsorbable");
|
||||
public static readonly PawnRelationDef Relation_birthgiver = DefDatabase<PawnRelationDef>.AllDefs.FirstOrDefault(d => d.defName == "RJW_Sire");
|
||||
public static readonly PawnRelationDef Relation_spawn = DefDatabase<PawnRelationDef>.AllDefs.FirstOrDefault(d => d.defName == "RJW_Pup");
|
||||
|
|
Loading…
Reference in a new issue