mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
added menopause
This commit is contained in:
parent
0a5c7105a1
commit
4e5c02f5f0
16 changed files with 444 additions and 24 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Manifest>
|
||||
<identifier>RJW Menstruation</identifier>
|
||||
<version>1.0.0.6</version>
|
||||
<version>1.0.0.8</version>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<incompatibleWith />
|
||||
|
|
Binary file not shown.
49
Defs/Drugs/Pills_Menstruation.xml
Normal file
49
Defs/Drugs/Pills_Menstruation.xml
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<Defs>
|
||||
<ThingDef ParentName="MakeableDrugPillBase">
|
||||
<defName>OvaryRegenerationPill</defName>
|
||||
<label>Ovary regeneration pill</label>
|
||||
<description>Recovers ovary's health. Less effective on unhealthy ovary. Does not relieve climacteric symptoms.</description>
|
||||
<graphicData>
|
||||
<texPath>Things/Item/ORPill</texPath>
|
||||
<graphicClass>Graphic_StackCount</graphicClass>
|
||||
</graphicData>
|
||||
<rotatable>false</rotatable>
|
||||
<statBases>
|
||||
<WorkToMake>2400</WorkToMake>
|
||||
<MarketValue>120</MarketValue>
|
||||
<Mass>0.05</Mass>
|
||||
</statBases>
|
||||
<techLevel>Industrial</techLevel>
|
||||
<ingestible>
|
||||
<drugCategory>Medical</drugCategory>
|
||||
<outcomeDoers>
|
||||
<li Class="RJW_Menstruation.OvaryPillOutcomDoer">
|
||||
<effectOffset>0.3</effectOffset>
|
||||
</li>
|
||||
</outcomeDoers>
|
||||
</ingestible>
|
||||
<recipeMaker>
|
||||
<researchPrerequisite>DrugProduction</researchPrerequisite>
|
||||
<recipeUsers>
|
||||
<li>DrugLab</li>
|
||||
</recipeUsers>
|
||||
</recipeMaker>
|
||||
<costList>
|
||||
<MedicineHerbal>10</MedicineHerbal>
|
||||
<Neutroamine>4</Neutroamine>
|
||||
<InsectJelly>8</InsectJelly>
|
||||
</costList>
|
||||
<comps>
|
||||
<li Class="CompProperties_Drug">
|
||||
<addictiveness>0</addictiveness>
|
||||
<listOrder>1000</listOrder>
|
||||
<overdoseSeverityOffset>
|
||||
<min>0.08</min>
|
||||
<max>0.14</max>
|
||||
</overdoseSeverityOffset>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
</Defs>
|
|
@ -20,21 +20,37 @@
|
|||
<stages>
|
||||
<li>
|
||||
<label>unpleasant</label>
|
||||
<statFactors>
|
||||
<SexFrequency>0.90</SexFrequency>
|
||||
<SexSatisfaction>0.95</SexSatisfaction>
|
||||
</statFactors>
|
||||
<painOffset>0.05</painOffset>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.2</minSeverity>
|
||||
<label>annoy</label>
|
||||
<statFactors>
|
||||
<SexFrequency>0.70</SexFrequency>
|
||||
<SexSatisfaction>0.90</SexSatisfaction>
|
||||
</statFactors>
|
||||
<painOffset>0.1</painOffset>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.4</minSeverity>
|
||||
<label>ache</label>
|
||||
<statFactors>
|
||||
<SexFrequency>0.50</SexFrequency>
|
||||
<SexSatisfaction>0.70</SexSatisfaction>
|
||||
</statFactors>
|
||||
<painOffset>0.2</painOffset>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.6</minSeverity>
|
||||
<label>painful</label>
|
||||
<statFactors>
|
||||
<SexFrequency>0.0</SexFrequency>
|
||||
<SexSatisfaction>0.50</SexSatisfaction>
|
||||
</statFactors>
|
||||
<painOffset>0.4</painOffset>
|
||||
</li>
|
||||
</stages>
|
||||
|
@ -44,4 +60,120 @@
|
|||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
||||
<HediffDef Name="Hediff_Menopause">
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<defName>Hediff_Menopause</defName>
|
||||
<label>Menopause</label>
|
||||
<labelNoun>menopause</labelNoun>
|
||||
<description>reached menopause</description>
|
||||
<labelNounPretty>{1} reached menopause</labelNounPretty>
|
||||
<defaultLabelColor>(0.70,0.70,0.00)</defaultLabelColor>
|
||||
<isBad>false</isBad>
|
||||
<tendable>false</tendable>
|
||||
<makesSickThought>false</makesSickThought>
|
||||
<makesAlert>false</makesAlert>
|
||||
<maxSeverity>1</maxSeverity>
|
||||
<initialSeverity>0.1</initialSeverity>
|
||||
<injuryProps>
|
||||
<canMerge>true</canMerge>
|
||||
</injuryProps>
|
||||
<stages>
|
||||
<li>
|
||||
<statFactors>
|
||||
<SexFrequency>0.20</SexFrequency>
|
||||
<SexSatisfaction>0.25</SexSatisfaction>
|
||||
</statFactors>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>RJW_Fertility</capacity>
|
||||
<postFactor>0.00</postFactor>
|
||||
</li>
|
||||
</capMods>
|
||||
</li>
|
||||
</stages>
|
||||
<comps>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
||||
<HediffDef Name="Hediff_Climacteric">
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<defName>Hediff_Climacteric</defName>
|
||||
<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>
|
||||
<maxSeverity>1</maxSeverity>
|
||||
<initialSeverity>0.1</initialSeverity>
|
||||
<injuryProps>
|
||||
<canMerge>true</canMerge>
|
||||
</injuryProps>
|
||||
<stages>
|
||||
<li>
|
||||
<label>early</label>
|
||||
<statFactors>
|
||||
<SexFrequency>0.75</SexFrequency>
|
||||
<SexSatisfaction>0.8</SexSatisfaction>
|
||||
</statFactors>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>RJW_Fertility</capacity>
|
||||
<postFactor>0.50</postFactor>
|
||||
</li>
|
||||
</capMods>
|
||||
</li>
|
||||
<li>
|
||||
<label>middle</label>
|
||||
<minSeverity>0.2</minSeverity>
|
||||
<statFactors>
|
||||
<SexFrequency>0.50</SexFrequency>
|
||||
<SexSatisfaction>0.6</SexSatisfaction>
|
||||
</statFactors>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>RJW_Fertility</capacity>
|
||||
<postFactor>0.25</postFactor>
|
||||
</li>
|
||||
</capMods>
|
||||
</li>
|
||||
<li>
|
||||
<label>latter</label>
|
||||
<minSeverity>0.4</minSeverity>
|
||||
<statFactors>
|
||||
<SexFrequency>0.40</SexFrequency>
|
||||
<SexSatisfaction>0.4</SexSatisfaction>
|
||||
</statFactors>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>RJW_Fertility</capacity>
|
||||
<postFactor>0.10</postFactor>
|
||||
</li>
|
||||
</capMods>
|
||||
</li>
|
||||
<li>
|
||||
<label>end</label>
|
||||
<minSeverity>0.6</minSeverity>
|
||||
<statFactors>
|
||||
<SexFrequency>0.25</SexFrequency>
|
||||
<SexSatisfaction>0.25</SexSatisfaction>
|
||||
</statFactors>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>RJW_Fertility</capacity>
|
||||
<postFactor>0.01</postFactor>
|
||||
</li>
|
||||
</capMods>
|
||||
</li>
|
||||
</stages>
|
||||
<comps>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
||||
|
||||
|
||||
</Defs>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LanguageData>
|
||||
<Mod_Title>RJW Menstrution Cycle</Mod_Title>
|
||||
<Mod_Title>RJW Menstruation Cycle</Mod_Title>
|
||||
|
||||
<Menstrual_Blood>menstrual blood</Menstrual_Blood>
|
||||
<Info_noCum>Empty</Info_noCum>
|
||||
|
@ -12,6 +12,7 @@
|
|||
<Stage_Pregnant>Pregnant</Stage_Pregnant>
|
||||
<Stage_Recover>Recovering from birth</Stage_Recover>
|
||||
<Stage_None>None</Stage_None>
|
||||
<Stage_Climacteric>Climacteric</Stage_Climacteric>
|
||||
<Dialog_WombInfo01>State</Dialog_WombInfo01>
|
||||
<Dialog_WombInfo02>Fetus</Dialog_WombInfo02>
|
||||
<Dialog_WombInfo03>Father</Dialog_WombInfo03>
|
||||
|
@ -47,7 +48,9 @@
|
|||
<Option11_Desc_2>Show all informations about fetus after noticed pregnancy</Option11_Desc_2>
|
||||
<Option11_Desc_3>Do not show informations about fetus, but display image of fetus after noticed pregnancy</Option11_Desc_3>
|
||||
<Option11_Desc_4>Do not show fetus image and informations</Option11_Desc_4>
|
||||
<Option12_Label></Option12_Label>
|
||||
<Option12_Desc> </Option12_Desc>
|
||||
<Option12_Label>enable menopause</Option12_Label>
|
||||
<Option12_Desc>enable menopause effect that makes pawn infertile in time progress if you have problems with long life races, turn off this option. this option will apply after save loaded</Option12_Desc>
|
||||
<Option13_Label></Option13_Label>
|
||||
<Option13_Desc> </Option13_Desc>
|
||||
|
||||
</LanguageData>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LanguageData>
|
||||
<Mod_Title>RJW Menstrution Cycle</Mod_Title>
|
||||
<Mod_Title>RJW Menstruation Cycle</Mod_Title>
|
||||
|
||||
<Menstrual_Blood>생리혈</Menstrual_Blood>
|
||||
<Info_noCum>없음</Info_noCum>
|
||||
|
@ -12,6 +12,7 @@
|
|||
<Stage_Pregnant>임신</Stage_Pregnant>
|
||||
<Stage_Recover>회복기</Stage_Recover>
|
||||
<Stage_None>없음</Stage_None>
|
||||
<Stage_Climacteric>갱년기</Stage_Climacteric>
|
||||
<Dialog_WombInfo01>상태</Dialog_WombInfo01>
|
||||
<Dialog_WombInfo02>태아</Dialog_WombInfo02>
|
||||
<Dialog_WombInfo03>부</Dialog_WombInfo03>
|
||||
|
@ -47,8 +48,10 @@
|
|||
<Option11_Desc_2>임신을 발견한 이후에 태아에 대한 모든 정보를 표시합니다.</Option11_Desc_2>
|
||||
<Option11_Desc_3>태아에 대한 정보를 표시하지 않지만, 임신한 이후 태아이미지를 표시합니다.</Option11_Desc_3>
|
||||
<Option11_Desc_4>태아에 대한 어떠한 정보도 표시하지 않습니다.</Option11_Desc_4>
|
||||
<Option12_Label></Option12_Label>
|
||||
<Option12_Desc> </Option12_Desc>
|
||||
<Option12_Label>폐경기 활성화</Option12_Label>
|
||||
<Option12_Desc>시간이 지남에따라 불임상태로 만드는 폐경기를 활성화합니다. 수명이 긴 종족을 사용할때 문제가 있으면 이 옵션을 끄세요. 변경한후에 세이브로드가 필요합니다.</Option12_Desc>
|
||||
<Option13_Label></Option13_Label>
|
||||
<Option13_Desc> </Option13_Desc>
|
||||
|
||||
|
||||
</LanguageData>
|
|
@ -4,6 +4,7 @@
|
|||
<!-- folicularIntervalDays includes bleedingIntervalDays. -->
|
||||
<!-- bleedingIntervalDays must be smaller than folicularIntervalDays -->
|
||||
<!-- unit of maxCumCapacity is ml -->
|
||||
<!-- one egg = 1 ovaryPower-->
|
||||
|
||||
<Patch>
|
||||
<Operation Class="PatchOperationAdd">
|
||||
|
@ -22,6 +23,7 @@
|
|||
<eggLifespanDays>3</eggLifespanDays>
|
||||
<wombTex>Womb/Womb</wombTex>
|
||||
<vagTex>Genitals/Vagina</vagTex>
|
||||
<ovaryPower>420</ovaryPower>
|
||||
</li>
|
||||
</comps>
|
||||
</value>
|
||||
|
|
BIN
Textures/Things/Item/ORPill/ORPill_a.png
Normal file
BIN
Textures/Things/Item/ORPill/ORPill_a.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
BIN
Textures/Things/Item/ORPill/ORPill_b.png
Normal file
BIN
Textures/Things/Item/ORPill/ORPill_b.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
|
@ -1,8 +1,28 @@
|
|||
Version 1.0.0.8
|
||||
- added option for disable menopause.
|
||||
|
||||
Version 1.0.0.7
|
||||
- fixed errors when attatch new vagina.
|
||||
- ovulation stage produces multiple eggs and number of eggs are determined by race's litter size curve.
|
||||
- but still, only one egg can proceed to pregnancy.
|
||||
- added new attribute ovaryPower to CompProperties_Menstruation.
|
||||
- default value is almost unlimited that never comes menopause.
|
||||
- every ovulation decreases ovaryPower.
|
||||
- when ovaryPower is low, climacteric begins.
|
||||
- during in climacteric, cycles become irregular and lose fertility in progress.
|
||||
- ovulation using hyperfertility pills consumes ovaryPower double times.
|
||||
- hyperfertility pills decrease additional ovaryPower (abuse of hyperfertility pills will cause premature menopause)
|
||||
- climacteric and menopause decrease sex drive and satisfaction.
|
||||
- added ovary regeneration pill that can prevent climacteric.
|
||||
- ovary regeneration pill increases 30% of ovaryPower. (no limit, cannot cure climacteric)
|
||||
- in period hediff decrease sex drive and satisfaction.
|
||||
|
||||
Version 1.0.0.6
|
||||
- if pawn is fertility stat is 0, stage is fixed at none.
|
||||
- added option for fetus information level.
|
||||
- depend on information level, pregnant stage display as luteal stage
|
||||
- rewrote misspelled DNADef attribute
|
||||
- rewrote misspelled DNADef attribute and mod title in mod settings
|
||||
|
||||
Version 1.0.0.5
|
||||
- womb cum capacity is affected by pawn's bodysize
|
||||
- changed cum volume calculate method.
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace RJW_Menstruation
|
|||
public static bool DrawWombStatus = true;
|
||||
public static bool DrawVaginaStatus = true;
|
||||
public static bool Debug = false;
|
||||
public static bool EnableMenopause = true;
|
||||
public static DetailLevel InfoDetail = DetailLevel.All;
|
||||
|
||||
|
||||
|
@ -82,6 +83,7 @@ namespace RJW_Menstruation
|
|||
Scribe_Values.Look(ref DrawVaginaStatus, "DrawVaginaStatus", DrawVaginaStatus, true);
|
||||
Scribe_Values.Look(ref Debug, "Debug", Debug, true);
|
||||
Scribe_Values.Look(ref InfoDetail, "InfoDetail", InfoDetail, true);
|
||||
Scribe_Values.Look(ref EnableMenopause, "EnableMenopause", EnableMenopause, true);
|
||||
base.ExposeData();
|
||||
}
|
||||
|
||||
|
@ -140,6 +142,8 @@ namespace RJW_Menstruation
|
|||
}
|
||||
|
||||
listmain.CheckboxLabeled(Translations.Option2_Label, ref Configurations.EnableAnimalCycle, Translations.Option2_Desc);
|
||||
|
||||
listmain.CheckboxLabeled(Translations.Option12_Label, ref Configurations.EnableMenopause, Translations.Option12_Desc);
|
||||
|
||||
listmain.Label(Translations.Option3_Label + " " + Configurations.ImplantationChance*100 + "%", -1, Translations.Option3_Desc);
|
||||
Configurations.ImplantationChanceAdjust = (int)listmain.Slider(Configurations.ImplantationChanceAdjust, 0, 1000);
|
||||
|
|
|
@ -13,9 +13,37 @@ namespace RJW_Menstruation
|
|||
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
|
||||
{
|
||||
HediffComp_Menstruation comp = Utility.GetMenstruationComp(pawn);
|
||||
if (comp.curStage.Equals(HediffComp_Menstruation.Stage.Follicular) || comp.curStage.Equals(HediffComp_Menstruation.Stage.Luteal)) comp.curStage = HediffComp_Menstruation.Stage.Ovulatory;
|
||||
if (comp != null && comp.curStage.Equals(HediffComp_Menstruation.Stage.Follicular)
|
||||
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.Luteal)
|
||||
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.ClimactericFollicular)
|
||||
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.ClimactericLuteal)
|
||||
)
|
||||
{
|
||||
comp.curStage = HediffComp_Menstruation.Stage.Ovulatory;
|
||||
comp.ovarypower--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class OvaryPillOutcomDoer : IngestionOutcomeDoer
|
||||
{
|
||||
public float effectOffset;
|
||||
|
||||
|
||||
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
|
||||
{
|
||||
HediffComp_Menstruation comp = Utility.GetMenstruationComp(pawn);
|
||||
if (comp != null)
|
||||
{
|
||||
comp.ovarypower = (int)(comp.ovarypower * (1 + effectOffset));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace RJW_Menstruation
|
|||
public string wombTex = "Womb/Womb"; //fertiledays = ovaluationday - spermlifespan ~ ovaluationday + egglifespanday
|
||||
public string vagTex = "Genitals/Vagina"; //fertiledays = ovaluationday - spermlifespan ~ ovaluationday + egglifespanday
|
||||
public bool infertile = false;
|
||||
|
||||
public int ovaryPower = 600000000; // default: almost unlimited ovulation
|
||||
public CompProperties_Menstruation()
|
||||
{
|
||||
|
||||
|
@ -53,6 +53,7 @@ namespace RJW_Menstruation
|
|||
public class HediffComp_Menstruation : HediffComp
|
||||
{
|
||||
const float minmakefilthvalue = 1.0f;
|
||||
const int ovarypowerthreshold = 72;
|
||||
|
||||
public static readonly int tickInterval = 2500; // an hour
|
||||
public CompProperties_Menstruation Props;
|
||||
|
@ -60,6 +61,8 @@ namespace RJW_Menstruation
|
|||
public int curStageHrs = 0;
|
||||
public Action actionref;
|
||||
public bool loaded = false;
|
||||
public int ovarypower = -100000;
|
||||
|
||||
|
||||
public enum Stage
|
||||
{
|
||||
|
@ -71,7 +74,10 @@ namespace RJW_Menstruation
|
|||
Pregnant,
|
||||
Recover,
|
||||
None,
|
||||
Young
|
||||
Young,
|
||||
ClimactericFollicular,
|
||||
ClimactericLuteal,
|
||||
ClimactericBleeding,
|
||||
}
|
||||
|
||||
private List<Cum> cums;
|
||||
|
@ -215,6 +221,12 @@ namespace RJW_Menstruation
|
|||
case Stage.None:
|
||||
case Stage.Young:
|
||||
return Translations.Stage_None;
|
||||
case Stage.ClimactericFollicular:
|
||||
return Translations.Stage_Follicular + " - " + Translations.Stage_Climacteric;
|
||||
case Stage.ClimactericLuteal:
|
||||
return Translations.Stage_Luteal + " - " + Translations.Stage_Climacteric;
|
||||
case Stage.ClimactericBleeding:
|
||||
return Translations.Stage_Bleeding + " - " + Translations.Stage_Climacteric;
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
@ -256,6 +268,14 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
public int GetNumofEggs
|
||||
{
|
||||
get
|
||||
{
|
||||
if (eggs.NullOrEmpty()) return 0;
|
||||
else return eggs.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public override void CompExposeData()
|
||||
{
|
||||
|
@ -269,6 +289,7 @@ namespace RJW_Menstruation
|
|||
Scribe_Values.Look(ref bleedingIntervalhours, "bleedingIntervalhours", bleedingIntervalhours, true);
|
||||
Scribe_Values.Look(ref recoveryIntervalhours, "recoveryIntervalhours", recoveryIntervalhours, true);
|
||||
Scribe_Values.Look(ref crampPain, "crampPain", crampPain, true);
|
||||
Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true);
|
||||
|
||||
|
||||
}
|
||||
|
@ -276,8 +297,7 @@ namespace RJW_Menstruation
|
|||
|
||||
public override void CompPostPostAdd(DamageInfo? dinfo)
|
||||
{
|
||||
//initializer moved to SpawnSetup
|
||||
//Initialize();
|
||||
if (!loaded) Initialize();
|
||||
}
|
||||
|
||||
public override void CompPostTick(ref float severityAdjustment)
|
||||
|
@ -546,6 +566,34 @@ namespace RJW_Menstruation
|
|||
if (crampPain < 0) crampPain = PainRandomizer();
|
||||
if (cums == null) cums = new List<Cum>();
|
||||
if (eggs == null) eggs = new List<Egg>();
|
||||
|
||||
|
||||
if (!Configurations.EnableMenopause)
|
||||
{
|
||||
Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Climacteric);
|
||||
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
|
||||
hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Menopause);
|
||||
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
|
||||
}
|
||||
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)
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (parent.pawn.IsPregnant()) curStage = Stage.Pregnant;
|
||||
if (parent.pawn.IsAnimal())
|
||||
{
|
||||
|
@ -556,8 +604,7 @@ namespace RJW_Menstruation
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(Stage.Young), tickInterval, parent.pawn, false);
|
||||
if (!parent.pawn.IsPregnant() && parent.pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(Stage.Young), tickInterval, parent.pawn, false);
|
||||
else HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), tickInterval, parent.pawn, false);
|
||||
}
|
||||
}
|
||||
|
@ -598,7 +645,7 @@ namespace RJW_Menstruation
|
|||
if (egg.position < 24 || !egg.fertilized) continue;
|
||||
else if (Rand.Range(0.0f, 1.0f) <= Configurations.ImplantationChance * Props.baseImplantationChanceFactor * ImplantFactor * InterspeciesImplantFactor(egg.fertilizer))
|
||||
{
|
||||
PregnancyHelper.PregnancyDecider(parent.pawn, egg.fertilizer);
|
||||
if (!parent.pawn.IsPregnant()) PregnancyHelper.PregnancyDecider(parent.pawn, egg.fertilizer);
|
||||
pregnant = true;
|
||||
break;
|
||||
}
|
||||
|
@ -680,9 +727,37 @@ namespace RJW_Menstruation
|
|||
case Stage.Ovulatory:
|
||||
action = delegate
|
||||
{
|
||||
eggs.Add(new Egg((int)(Props.eggLifespanDays * 24 / CycleFactor)));
|
||||
lutealIntervalhours = PeriodRandomizer(lutealIntervalhours, Props.deviationFactor);
|
||||
GoNextStage(Stage.Luteal);
|
||||
int i = 0;
|
||||
do
|
||||
{
|
||||
ovarypower--;
|
||||
eggs.Add(new Egg((int)(Props.eggLifespanDays * 24 / CycleFactor)));
|
||||
i++;
|
||||
} while (i < Rand.ByCurve(parent.pawn.RaceProps.litterSizeCurve));
|
||||
|
||||
if (Configurations.EnableMenopause && ovarypower < 1)
|
||||
{
|
||||
eggs.Clear();
|
||||
Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Climacteric);
|
||||
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
|
||||
hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, parent.pawn);
|
||||
hediff.Severity = 0.2f;
|
||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||
GoNextStage(Stage.Young);
|
||||
}
|
||||
else if (Configurations.EnableMenopause && ovarypower < ovarypowerthreshold)
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Climacteric, parent.pawn);
|
||||
hediff.Severity = 0.008f * i;
|
||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||
lutealIntervalhours = PeriodRandomizer(lutealIntervalhours, Props.deviationFactor * 6);
|
||||
GoNextStage(Stage.ClimactericLuteal);
|
||||
}
|
||||
else
|
||||
{
|
||||
lutealIntervalhours = PeriodRandomizer(lutealIntervalhours, Props.deviationFactor);
|
||||
GoNextStage(Stage.Luteal);
|
||||
}
|
||||
};
|
||||
break;
|
||||
case Stage.Luteal:
|
||||
|
@ -776,8 +851,19 @@ namespace RJW_Menstruation
|
|||
{
|
||||
if (curStageHrs >= recoveryIntervalhours)
|
||||
{
|
||||
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
|
||||
GoNextStage(Stage.Follicular);
|
||||
if (ovarypower < ovarypowerthreshold)
|
||||
{
|
||||
GoNextStage(Stage.ClimactericFollicular);
|
||||
}
|
||||
else if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) == 0)
|
||||
{
|
||||
GoNextStage(Stage.Young);
|
||||
}
|
||||
else
|
||||
{
|
||||
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
|
||||
GoNextStage(Stage.Follicular);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -799,6 +885,90 @@ namespace RJW_Menstruation
|
|||
else GoNextStage(Stage.Follicular);
|
||||
};
|
||||
break;
|
||||
case Stage.ClimactericFollicular:
|
||||
action = delegate
|
||||
{
|
||||
if (curStageHrs >= (follicularIntervalhours - bleedingIntervalhours) * CycleFactor)
|
||||
{
|
||||
GoNextStage(Stage.Ovulatory);
|
||||
}
|
||||
else if (ovarypower < ovarypowerthreshold / 3 && Rand.Range(0.0f, 1.0f) < 0.2f) //skips ovulatory
|
||||
{
|
||||
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor * 6);
|
||||
GoNextStage(Stage.ClimactericFollicular);
|
||||
}
|
||||
else
|
||||
{
|
||||
curStageHrs += Configurations.CycleAcceleration;
|
||||
StayCurrentStage();
|
||||
}
|
||||
};
|
||||
break;
|
||||
case Stage.ClimactericLuteal:
|
||||
action = delegate
|
||||
{
|
||||
if (!eggs.NullOrEmpty())
|
||||
{
|
||||
EggDecay();
|
||||
FertilizationCheck();
|
||||
if (Implant()) GoNextStage(Stage.Pregnant);
|
||||
else
|
||||
{
|
||||
curStageHrs += Configurations.CycleAcceleration;
|
||||
StayCurrentStage();
|
||||
}
|
||||
}
|
||||
else if (curStageHrs <= lutealIntervalhours)
|
||||
{
|
||||
curStageHrs += Configurations.CycleAcceleration;
|
||||
StayCurrentStage();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Props.bleedingIntervalDays == 0)
|
||||
{
|
||||
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor * 6);
|
||||
GoNextStage(Stage.ClimactericFollicular);
|
||||
}
|
||||
else if (ovarypower < ovarypowerthreshold / 4 || (ovarypower < ovarypowerthreshold / 3 && Rand.Range(0.0f,1.0f) < 0.3f)) //skips bleeding
|
||||
{
|
||||
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor * 6);
|
||||
GoNextStage(Stage.ClimactericFollicular);
|
||||
}
|
||||
else
|
||||
{
|
||||
bleedingIntervalhours = PeriodRandomizer(bleedingIntervalhours, Props.deviationFactor);
|
||||
if (crampPain >= 0.05f)
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_MenstrualCramp, parent.pawn);
|
||||
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));
|
||||
}
|
||||
GoNextStage(Stage.ClimactericBleeding);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
break;
|
||||
case Stage.ClimactericBleeding:
|
||||
action = delegate
|
||||
{
|
||||
if (curStageHrs >= bleedingIntervalhours)
|
||||
{
|
||||
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor * 6);
|
||||
GoNextStage(Stage.ClimactericFollicular);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (curStageHrs < bleedingIntervalhours / 6) for (int i = 0; i < Configurations.CycleAcceleration; i++) BleedOut();
|
||||
curStageHrs += Configurations.CycleAcceleration;
|
||||
StayCurrentStage();
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
||||
default:
|
||||
curStage = Stage.Follicular;
|
||||
curStageHrs = 0;
|
||||
|
@ -840,7 +1010,7 @@ namespace RJW_Menstruation
|
|||
{
|
||||
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curstage), (int)(tickInterval * factor), parent.pawn, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -47,15 +47,21 @@ namespace RJW_Menstruation
|
|||
private static void AddWombGizmos(Pawn __instance, ref List<Gizmo> gizmoList)
|
||||
{
|
||||
HediffComp_Menstruation comp = Utility.GetMenstruationComp(__instance);
|
||||
|
||||
if (comp != null) gizmoList.Add(CreateGizmo_WombStatus(__instance, comp));
|
||||
|
||||
|
||||
//If should i have to add multiple vagina support.
|
||||
//foreach (HediffComp comp in __instance.health.hediffSet.GetAllComps())
|
||||
//{
|
||||
// if (comp is HediffComp_Menstruation) gizmoList.Add(CreateGizmo_WombStatus(__instance, (HediffComp_Menstruation)comp));
|
||||
//}
|
||||
}
|
||||
|
||||
private static Gizmo CreateGizmo_WombStatus(Pawn pawn , HediffComp_Menstruation comp)
|
||||
{
|
||||
Texture2D icon,icon_overay;
|
||||
string description = "";
|
||||
if (Configurations.Debug) description += comp.curStage + ": " + comp.curStageHrs + "\n" + "fertcums: " + comp.TotalFertCum + "\n";
|
||||
if (Configurations.Debug) description += comp.curStage + ": " + comp.curStageHrs + "\n" + "fertcums: " + comp.TotalFertCum + "\n" + "ovarypower: " + comp.ovarypower + "\n" + "eggs: " + comp.GetNumofEggs + "\n";
|
||||
else description += comp.GetCurStageLabel + "\n";
|
||||
if (pawn.IsPregnant())
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace RJW_Menstruation
|
|||
public static readonly string Stage_Pregnant = "Stage_Pregnant".Translate();
|
||||
public static readonly string Stage_Recover = "Stage_Recover".Translate();
|
||||
public static readonly string Stage_None = "Stage_None".Translate();
|
||||
public static readonly string Stage_Climacteric = "Stage_Climacteric".Translate();
|
||||
|
||||
public static readonly string Dialog_WombInfo01 = "Dialog_WombInfo01".Translate();
|
||||
public static readonly string Dialog_WombInfo02 = "Dialog_WombInfo02".Translate();
|
||||
|
|
|
@ -21,6 +21,8 @@ namespace RJW_Menstruation
|
|||
public static readonly ThingDef CumFilth = DefDatabase<ThingDef>.GetNamed("FilthCum");
|
||||
public static readonly HediffDef RJW_IUD = DefDatabase<HediffDef>.GetNamed("RJW_IUD");
|
||||
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");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue