Compare commits

..

No commits in common. "32800a3499aa81594cca6b51b34065d0eed37437" and "30a5d844760afab6c7ec2013323943087a39dc16" have entirely different histories.

45 changed files with 484 additions and 841 deletions

Binary file not shown.

View file

@ -21,11 +21,6 @@
<iconPath>UI/Genes/Placeholder</iconPath>
<biostatMet>1</biostatMet>
<displayOrderInCategory>10</displayOrderInCategory>
<modExtensions>
<li Class ="RJW_Menstruation.MenstruationModExtension">
<eggLifeTimeFactor>0.75</eggLifeTimeFactor>
</li>
</modExtensions>
</GeneDef>
<GeneDef ParentName="Menstruation_EggLifetime">
@ -35,11 +30,6 @@
<iconPath>UI/Genes/Placeholder</iconPath>
<biostatMet>-1</biostatMet>
<displayOrderInCategory>12</displayOrderInCategory>
<modExtensions>
<li Class ="RJW_Menstruation.MenstruationModExtension">
<eggLifeTimeFactor>2.0</eggLifeTimeFactor>
</li>
</modExtensions>
</GeneDef>
<GeneDef ParentName="Menstruation_EggLifetime">
@ -50,11 +40,6 @@
<biostatMet>-2</biostatMet>
<biostatCpx>1</biostatCpx>
<displayOrderInCategory>16</displayOrderInCategory>
<modExtensions>
<li Class ="RJW_Menstruation.MenstruationModExtension">
<eggLifeTimeFactor>4.0</eggLifeTimeFactor>
</li>
</modExtensions>
</GeneDef>
<GeneDef Name="Menstruation_Estrus" Abstract="True">
@ -71,11 +56,6 @@
<iconPath>UI/Genes/Placeholder</iconPath>
<biostatMet>1</biostatMet>
<displayOrderInCategory>20</displayOrderInCategory>
<modExtensions>
<li Class ="RJW_Menstruation.MenstruationModExtension">
<neverEstrus>true</neverEstrus>
</li>
</modExtensions>
</GeneDef>
<GeneDef ParentName="Menstruation_Estrus">
@ -86,11 +66,6 @@
<biostatMet>-1</biostatMet>
<biostatCpx>1</biostatCpx>
<displayOrderInCategory>25</displayOrderInCategory>
<modExtensions>
<li Class ="RJW_Menstruation.MenstruationModExtension">
<alwaysEstrus>true</alwaysEstrus>
</li>
</modExtensions>
</GeneDef>
<GeneDef Name="Menstruation_Ovulation" Abstract="True">
@ -107,11 +82,6 @@
<iconPath>UI/Genes/Placeholder</iconPath>
<biostatMet>-1</biostatMet>
<displayOrderInCategory>30</displayOrderInCategory>
<modExtensions>
<li Class ="RJW_Menstruation.MenstruationModExtension">
<ovulationFactor>2</ovulationFactor>
</li>
</modExtensions>
</GeneDef>
<GeneDef ParentName="Menstruation_Ovulation">
@ -121,11 +91,6 @@
<iconPath>UI/Genes/Placeholder</iconPath>
<biostatMet>-1</biostatMet>
<displayOrderInCategory>35</displayOrderInCategory>
<modExtensions>
<li Class ="RJW_Menstruation.MenstruationModExtension">
<ovulationFactor>4</ovulationFactor>
</li>
</modExtensions>
</GeneDef>
<GeneDef>
@ -134,13 +99,8 @@
<displayCategory>Menstruation</displayCategory>
<description>Carriers of this gene will not bleed at the end of their cycle.</description>
<iconPath>UI/Genes/Placeholder</iconPath>
<biostatMet>-1</biostatMet>
<biostatMet>1</biostatMet>
<displayOrderInCategory>40</displayOrderInCategory>
<modExtensions>
<li Class ="RJW_Menstruation.MenstruationModExtension">
<noBleeding>true</noBleeding>
</li>
</modExtensions>
</GeneDef>
<!-- Pheromones? -->

View file

@ -59,16 +59,9 @@
<tags>
<li>Absorber</li>
</tags>
<defaultOutfitTags>
<li>Worker</li>
<li>Soldier</li>
<li>Nudist</li>
<li>Slave</li>
</defaultOutfitTags>
</apparel>
<modExtensions>
<li Class="RJW_Menstruation.AbsorberModExtension">
<passiveAbsorptionPerHour>0.2</passiveAbsorptionPerHour>
<leakAfterDirty>false</leakAfterDirty>
<effectsAfterDirty>true</effectsAfterDirty>
<minHourstoDirtyEffect>10</minHourstoDirtyEffect>
@ -123,7 +116,6 @@
</apparel>
<modExtensions>
<li Class="RJW_Menstruation.AbsorberModExtension">
<passiveAbsorptionPerHour>0.2</passiveAbsorptionPerHour>
<leakAfterDirty>false</leakAfterDirty>
<effectsAfterDirty>true</effectsAfterDirty>
<minHourstoDirtyEffect>8</minHourstoDirtyEffect>
@ -198,15 +190,9 @@
<tags>
<li>Absorber</li>
</tags>
<defaultOutfitTags>
<li>Worker</li>
<li>Soldier</li>
<li>Slave</li>
</defaultOutfitTags>
</apparel>
<modExtensions>
<li Class="RJW_Menstruation.AbsorberModExtension">
<passiveAbsorptionPerHour>0.04</passiveAbsorptionPerHour>
<leakAfterDirty>true</leakAfterDirty>
<effectsAfterDirty>false</effectsAfterDirty>
<dirtyDef>Absorber_Pad_Dirty</dirtyDef>
@ -268,7 +254,6 @@
</apparel>
<modExtensions>
<li Class="RJW_Menstruation.AbsorberModExtension">
<passiveAbsorptionPerHour>0.04</passiveAbsorptionPerHour>
<leakAfterDirty>true</leakAfterDirty>
<effectsAfterDirty>false</effectsAfterDirty>
<dirtyDef>Absorber_Pad_Dirty</dirtyDef>

View file

@ -13,10 +13,4 @@
<Hediff_PainReliever.description>緩解源自於痛經及此類神經痛的苦楚。</Hediff_PainReliever.description>
<Hediff_Cyclosporine.label>環孢素</Hediff_Cyclosporine.label>
<Hediff_Cyclosporine.description>由於免疫抑製劑的作用,身體抵抗感染和疾病的能力受扼制。</Hediff_Cyclosporine.description>
<!--Auto generated: Wed Aug 30 16:05:07 2023-->
<Hediff_AffectedByPheromones.label>受費洛蒙影響</Hediff_AffectedByPheromones.label>
<Hediff_AffectedByPheromones.description>受附近某人處於發情期之故,此人的性需求及娛樂需求正急遽上升。</Hediff_AffectedByPheromones.description>
<Hediff_AffectedByPheromones.stages.0.label></Hediff_AffectedByPheromones.stages.0.label>
<Hediff_AffectedByPheromones.stages.1.label></Hediff_AffectedByPheromones.stages.1.label>
<Hediff_AffectedByPheromones.stages.2.label></Hediff_AffectedByPheromones.stages.2.label>
</LanguageData>

View file

@ -11,13 +11,4 @@
<!--Auto generated: Thu Jan 5 22:13:15 2023-->
<EggRestorationReceived.stages.0.label>卵母細胞再生術</EggRestorationReceived.stages.0.label>
<EggRestorationReceived.stages.0.description>我可以繼續繁衍一小段時間了!</EggRestorationReceived.stages.0.description>
<!--Auto generated: Wed Aug 30 16:05:07 2023-->
<CameInsideMIdeo.stages.0.label>內射了{0}</CameInsideMIdeo.stages.0.label>
<CameInsideMIdeo.stages.0.description>讓她懷孕正是我的職責所在。</CameInsideMIdeo.stages.0.description>
<CameInsideFIdeo.stages.0.label>{0}內射了我</CameInsideFIdeo.stages.0.label>
<CameInsideFIdeo.stages.0.description>我希望這次能懷上,讓我盡到責任。</CameInsideFIdeo.stages.0.description>
<HaterCameInsideFIdeo.stages.0.label>{0}內射了我</HaterCameInsideFIdeo.stages.0.label>
<HaterCameInsideFIdeo.stages.0.description>我知道我有生育的義務,但是難道非他不可嗎?</HaterCameInsideFIdeo.stages.0.description>
<HateTookContraceptivePillIdeo.stages.0.label>服用避孕藥</HateTookContraceptivePillIdeo.stages.0.label>
<HateTookContraceptivePillIdeo.stages.0.description>我的信仰要求我能夠懷孕。</HateTookContraceptivePillIdeo.stages.0.description>
</LanguageData>

View file

@ -154,18 +154,4 @@
<Option_EnableBiotechTwins_Label>(測試中!) 允許在「生機」(Biotech)追加的懷孕機制中出現多胞胎。</Option_EnableBiotechTwins_Label>
<Option_EnableBiotechTwins_Desc>啟用這個選項將允許同卵或異卵雙胞胎出現在「生機」(Biotech)追加的懷孕機制中。
一併將啟用雜交系統;然而兩個類人(humanlikes)生物絕不可能生出動物。</Option_EnableBiotechTwins_Desc>
<!--Auto generated: Wed Aug 30 16:05:07 2023-->
<Option_ColonistUpdateInterval_Label>玩家小人刷新間隔</Option_ColonistUpdateInterval_Label>
<Option_ColonistUpdateInterval_Desc>殖民者、囚犯和奴隸的子宮狀態應該每隔多久刷新一次?
較小的刷新間隔可以更精確地模擬真實子宮;較大的刷新間隔可以提升遊戲流暢度</Option_ColonistUpdateInterval_Desc>
<Option_NonColonistUpdateInterval_Label>非玩家小人刷新間隔</Option_NonColonistUpdateInterval_Label>
<Option_NonColonistUpdateInterval_Desc>非玩家勢力控制下的小人的子宮應該每隔多久刷新一次?
較小的刷新間隔可以更精確地模擬真實子宮;較大的刷新間隔可以提升遊戲流暢度</Option_NonColonistUpdateInterval_Desc>
<Option_AnimalUpdateInterval_Label>動物子宮刷新間隔</Option_AnimalUpdateInterval_Label>
<Option_AnimalUpdateInterval_Desc>動物們的子宮應該多久刷新一次?
較小的刷新間隔可以更精確地模擬真實子宮;較大的刷新間隔可以提升遊戲流暢度</Option_AnimalUpdateInterval_Desc>
<Option_EnablePheromones_Label>啟用費洛蒙機制</Option_EnablePheromones_Label>
<Option_EnablePheromones_Desc>擁有發情期的類人生物在發情期將刺激附近的雄性類人生物,使其性慾大增。</Option_EnablePheromones_Desc>
<Option_AnimalPheromoneEffect_Label>動物費洛蒙效果</Option_AnimalPheromoneEffect_Label>
<Option_AnimalPheromoneEffect_Desc>選定擁有發情期的動物在發情期內對類人生物的影響。</Option_AnimalPheromoneEffect_Desc>
</LanguageData>

View file

@ -37,7 +37,7 @@
<Dialog_WombInfo08></Dialog_WombInfo08>
<Dialog_WombInfo09></Dialog_WombInfo09>
<Dialog_FatherUnknown>Unknown</Dialog_FatherUnknown>
<Description_Absorbed>Absorbed</Description_Absorbed>
<Option1_Label_1>Enable womb icon</Option1_Label_1>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<Absorber.label>性器</Absorber.label>
</LanguageData>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<LanguageData>
<PainReliever.label>鎮痛剤</PainReliever.label>
<PainReliever.description>生理痛を24時間和らげます。&#10;&#10;その他の痛みにも効果あり。</PainReliever.description>
<Cyclosporine.label>シクロスポリン</Cyclosporine.label>
<Cyclosporine.description>免疫抑制剤。&#10;&#10;抗精子抗体を直すことができるが、24時間の間、体の免疫力は低下する。</Cyclosporine.description>
</LanguageData>

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<Hediff_MenstrualCramp.label>生理中</Hediff_MenstrualCramp.label>
<Hediff_MenstrualCramp.description>月経周期の終わりに膣からの出血。よく痛い。</Hediff_MenstrualCramp.description>
<Hediff_MenstrualCramp.stages.0.label>不快</Hediff_MenstrualCramp.stages.0.label>
<Hediff_MenstrualCramp.stages.1.label>痒い</Hediff_MenstrualCramp.stages.1.label>
<Hediff_MenstrualCramp.stages.2.label>痛い</Hediff_MenstrualCramp.stages.2.label>
<Hediff_MenstrualCramp.stages.3.label>苦痛</Hediff_MenstrualCramp.stages.3.label>
</LanguageData>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<VaginaWashing.reportString>膣を洗っている</VaginaWashing.reportString>
</LanguageData>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<MaxAbsorbable.label>吸収量</MaxAbsorbable.label>
<MaxAbsorbable.description>吸収可能な液体の最大量。</MaxAbsorbable.description>
</LanguageData>

View file

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<LanguageData>
<Absorber_Tampon.label>タンポン</Absorber_Tampon.label>
<Absorber_Tampon.description>膣内の体液を吸収するタンポン。長時間に着けて感染症を引き起こすことがある。</Absorber_Tampon.description>
<Absorber_Tampon_Dirty.label>汚れたタンポン</Absorber_Tampon_Dirty.label>
<Absorber_Tampon_Dirty.description>濡れた使用済みタンポン。そのままにしておくと感染症を引き起こす可能性がある。</Absorber_Tampon_Dirty.description>
<Absorber_Pad.label>生理用品</Absorber_Pad.label>
<Absorber_Pad.description>膣からの体液を吸収するためのナプキン。</Absorber_Pad.description>
<Absorber_Pad_Dirty.label>汚れた生理用品</Absorber_Pad_Dirty.label>
<Absorber_Pad_Dirty.description>濡れた使用済みナプキン</Absorber_Pad_Dirty.description>
<OvaryRegenerationPill.label>卵巣再生薬</OvaryRegenerationPill.label>
<OvaryRegenerationPill.description>卵巣を回復させ、卵子の数をある程度を回復させる。&#10;卵子がほとんど残っていない卵巣にはあまり効果がない。&#10;更年期の回復はできない。</OvaryRegenerationPill.description>
<SuperovulationInducingAgent.label>排卵剤</SuperovulationInducingAgent.label>
<SuperovulationInducingAgent.description>過排卵を誘発し、次の排卵で卵子を14個余分に産生させる。&#10;&#10;更年期を早める可能性がある。</SuperovulationInducingAgent.description>
<FilthMixture.label>混じった物</FilthMixture.label>
</LanguageData>

View file

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<LanguageData>
<LeakingFluids.stages.0.label>ぽたぽた</LeakingFluids.stages.0.label>
<LeakingFluids.stages.0.description>これを吸収するものはないのかな?</LeakingFluids.stages.0.description>
<HaterCameInsideM.stages.0.label>{0}に中出した</HaterCameInsideM.stages.0.label>
<HaterCameInsideM.stages.0.description>ライバルに中出した</HaterCameInsideM.stages.0.description>
<CameInsideM.stages.0.label>{0}に中出した</CameInsideM.stages.0.label>
<CameInsideM.stages.0.description>気持ちよかった。</CameInsideM.stages.0.description>
<CameInsideFFetish.stages.0.label>{0}に中出した</CameInsideFFetish.stages.0.label>
<CameInsideFFetish.stages.0.description>妊娠するといいな。</CameInsideFFetish.stages.0.description>
<HaterCameInsideF.stages.0.label>{0}に中出された</HaterCameInsideF.stages.0.label>
<HaterCameInsideF.stages.0.description>あいつの子を妊娠したくない!</HaterCameInsideF.stages.0.description>
<HaterCameInsideFEstrus.stages.0.label>{0}に中出された</HaterCameInsideFEstrus.stages.0.label>
<HaterCameInsideFEstrus.stages.0.description>そんなことをさせるなんて、私は何を考えていたんだろう?</HaterCameInsideFEstrus.stages.0.description>
<CameInsideFLowFert.stages.0.label>{0}に中出された</CameInsideFLowFert.stages.0.label>
<CameInsideFLowFert.stages.0.description>可能性は低いけど、妊娠できるかどうか心配で...</CameInsideFLowFert.stages.0.description>
<CameInsideF.stages.0.label>{0}に中出された</CameInsideF.stages.0.label>
<CameInsideF.stages.0.description>妊娠しないか心配なんだ。</CameInsideF.stages.0.description>
<CameInsideFFetishSafe.stages.0.label>{0}に中出された</CameInsideFFetishSafe.stages.0.label>
<CameInsideFFetishSafe.stages.0.description>妊娠するとは思わないけど、妄想するのは楽しい。</CameInsideFFetishSafe.stages.0.description>
<HaterCameInsideFSafe.stages.0.label>{0}に中出された</HaterCameInsideFSafe.stages.0.label>
<HaterCameInsideFSafe.stages.0.description>妊娠することはないだろうけど、やっぱり嫌だ。</HaterCameInsideFSafe.stages.0.description>
<UnwantedPregnancy.stages.0.label>望まない妊娠</UnwantedPregnancy.stages.0.label>
<UnwantedPregnancy.stages.0.description>赤ん坊の世話なんてできるか?どうすればいい?</UnwantedPregnancy.stages.0.description>
<UnwantedPregnancyMild.stages.0.label>望まない妊娠</UnwantedPregnancyMild.stages.0.label>
<UnwantedPregnancyMild.stages.0.description>赤ちゃんが生まれる。なんとかなるといいな。</UnwantedPregnancyMild.stages.0.description>
<TookContraceptivePill.stages.0.label>避妊ピルを飲んだ</TookContraceptivePill.stages.0.label>
<TookContraceptivePill.stages.0.description>もう大丈夫です。</TookContraceptivePill.stages.0.description>
<HateTookContraceptivePill.stages.0.label>避妊ピルを飲んだ</HateTookContraceptivePill.stages.0.label>
<HateTookContraceptivePill.stages.0.description>妊娠したい。</HateTookContraceptivePill.stages.0.description>
<EggRestorationReceived.stages.0.label>卵巣復活を得た</EggRestorationReceived.stages.0.label>
<EggRestorationReceived.stages.0.description>もう少しの間、繁殖ことができる。</EggRestorationReceived.stages.0.description>
</LanguageData>

View file

@ -1,152 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>
<Mod_Title>RJW Menstruation Cycle</Mod_Title>
<Menstrual_Blood>経血</Menstrual_Blood>
<Info_noCum>空っぽ</Info_noCum>
<Stage_Follicular>卵胞期</Stage_Follicular>
<Stage_Ovulatory>排卵期</Stage_Ovulatory>
<Stage_Luteal>黄体期</Stage_Luteal>
<Stage_Bleeding>月経期</Stage_Bleeding>
<Stage_Pregnant>妊娠</Stage_Pregnant>
<Stage_Recover>出産後</Stage_Recover>
<Stage_None>無し</Stage_None>
<Stage_Climacteric>クリマクテリック</Stage_Climacteric>
<Stage_Menopause>更年期</Stage_Menopause>
<Stage_Anestrus>無発情期</Stage_Anestrus>
<Stage_Follicular_Desc>卵巣は卵子を放出するの準備をしています。この時期の終わりに排卵が起こります。</Stage_Follicular_Desc>
<Stage_Follicular_Induced_Desc>卵巣は卵子を放出するの準備をしています。精液が子宮に入ると排卵が起こります。</Stage_Follicular_Induced_Desc>
<Stage_Ovulatory_Desc>卵巣が卵子を子宮に放出しています。</Stage_Ovulatory_Desc>
<Stage_Luteal_Desc>子宮は受精卵を受け入れる準備ができている。この時期が終る前に受精卵が着床すれば妊娠となります。</Stage_Luteal_Desc>
<Stage_Bleeding_Desc>子宮内膜は剥がれ落ち、着床できなかった受精卵を排出します。</Stage_Bleeding_Desc>
<Stage_Pregnant_Desc>子宮に赤ちゃんがいます。時間とケアによって、この世界の新しい住人となる。</Stage_Pregnant_Desc>
<Stage_Recover_Desc>子宮は最近の妊娠から回復しています。</Stage_Recover_Desc>
<Stage_None_Desc>子宮は繁殖能力がなく、妊娠することはできない。</Stage_None_Desc>
<Stage_Climacteric_Desc>卵巣が枯渇すると、月経周期が不規則になる。</Stage_Climacteric_Desc>
<Stage_Menopause_Desc>。卵巣が枯渇し、子宮が卵子を産み出せなくなる。</Stage_Menopause_Desc>
<Stage_Anestrus_Desc>繁殖期を過ぎた。時期が来れば発情周期は再開する。</Stage_Anestrus_Desc>
<Button_HealthTab>ステータス</Button_HealthTab>
<Button_MilkTooltip>自分を搾乳する</Button_MilkTooltip>
<Dialog_WombInfo01>ステータス</Dialog_WombInfo01>
<Dialog_WombInfo02>胎児</Dialog_WombInfo02>
<Dialog_WombInfo03>父親</Dialog_WombInfo03>
<Dialog_WombInfo04>精液リスト</Dialog_WombInfo04>
<Dialog_WombInfo05>受精卵</Dialog_WombInfo05>
<Dialog_WombInfo06>受精中</Dialog_WombInfo06>
<Dialog_WombInfo07>排卵済み</Dialog_WombInfo07>
<Dialog_WombInfo08></Dialog_WombInfo08>
<Dialog_WombInfo09></Dialog_WombInfo09>
<Dialog_DoCleanWomb_Tooltip>精液をバケッツに集める</Dialog_DoCleanWomb_Tooltip>
<Dialog_DontCleanWomb_Tooltip>子宮に精液をためる</Dialog_DontCleanWomb_Tooltip>
<Dialog_FatherUnknown>不明</Dialog_FatherUnknown>
<Option1_Label_1>Enable womb icon</Option1_Label_1>
<Option1_Label_2>Enable button in health tab</Option1_Label_2>
<Option2_Label>Enable animal cycle</Option2_Label>
<Option2_Desc>Simulate animal cycles.&#10;Not recommended.</Option2_Desc>
<Option3_Label>Implantation chance</Option3_Label>
<Option3_Desc>Base implantation chance of fertilized egg&#10;This value affects the chance of impregnation.</Option3_Desc>
<Option4_Label>Fertilization chance</Option4_Label>
<Option4_Desc>The fertilization chance per ml of sperm per hour&#10;This value affects the chance of impregnation.</Option4_Desc>
<Option5_Label>Cum decay ratio per hour</Option5_Label>
<Option5_Desc>The amount of cum in the womb will drop by this amount every hour&#10;This value affects the chance of impregnation.</Option5_Desc>
<Option6_Label>Cum fertility decay ratio per hour</Option6_Label>
<Option6_Desc>Cum will lose fertility by this amount every hour&#10;This value affects fertilization chance indirectly.</Option6_Desc>
<Option7_Label>Cycle acceleration</Option7_Label>
<Option7_Desc>Accelerate menstruation cycle&#10;This can cause early menopause and infertility.&#10;Setting this lower than x12 is recommended.&#10;Rimworld's timescale: x6(default)</Option7_Desc>
<Option_ColonistUpdateInterval_Label>Colonist update interval</Option_ColonistUpdateInterval_Label>
<Option_ColonistUpdateInterval_Desc>How often the womb of each of your colonists, prisoners, and slaves update.&#10;Lowering this will improve accuracy, increasing this can improve performance.</Option_ColonistUpdateInterval_Desc>
<Option_NonColonistUpdateInterval_Label>Non-colonist update interval</Option_NonColonistUpdateInterval_Label>
<Option_NonColonistUpdateInterval_Desc>How often the womb of humans you don't control update.&#10;Lowering this will improve accuracy, increasing this can improve performance.</Option_NonColonistUpdateInterval_Desc>
<Option_AnimalUpdateInterval_Label>Animal update interval</Option_AnimalUpdateInterval_Label>
<Option_AnimalUpdateInterval_Desc>How often the womb of animals update.&#10;Lowering this will improve accuracy, increasing this can improve performance.</Option_AnimalUpdateInterval_Desc>
<Option8_Label>Debug</Option8_Label>
<Option8_Desc>Show debug information.</Option8_Desc>
<Option9_Label>Womb status</Option9_Label>
<Option9_Desc>Draw womb icon in status window.</Option9_Desc>
<Option10_Label>Vagina and breast status</Option10_Label>
<Option10_Desc>Draw vagina, anus and breast icons in the status window.</Option10_Desc>
<Option11_Label>Fetus information level</Option11_Label>
<Option11_Desc_1>Show all information about a fetus.</Option11_Desc_1>
<Option11_Desc_2>Show all information about a fetus after discovered pregnancy.</Option11_Desc_2>
<Option11_Desc_3>Show only image of a fetus after discovered pregnancy.</Option11_Desc_3>
<Option11_Desc_4>Do not show any information about a fetus.</Option11_Desc_4>
<Option12_Label>Enable menopause</Option12_Label>
<Option12_Desc>Enable menopause effect that makes pawn infertile when they run out of eggs&#10;If you have problems with long lived races, turn off this option.</Option12_Desc>
<Option13_Label>Use multiple pregnancy</Option13_Label>
<Option13_Desc>Use multiple pregnancy instead RJW's default pregnancy&#10;Disable this option if you are in trouble with impregnation&#10;RJW pregnancy should be turned on.</Option13_Desc>
<Option14_Label>Enable hetero ovular twins</Option14_Label>
<Option14_Desc>Allow pregnancy from multiple eggs at the same time.</Option14_Desc>
<Option15_Label>Enable enzygotic twins</Option15_Label>
<Option15_Desc>Enable a single egg to result in multiple identical offspring.</Option15_Desc>
<Option16_Label>Enzygotic twins chance</Option16_Label>
<Option16_Desc>The chance of identical twins.</Option16_Desc>
<Option17_Label>Max enzygotic twins</Option17_Label>
<Option17_Desc>The maximum number of identical siblings.</Option17_Desc>
<Option18_Label>Enable egg overlay</Option18_Label>
<Option18_Desc>Enable egg overlay on womb icon.</Option18_Desc>
<Option19_Label_1>Bleeding amount</Option19_Label_1>
<Option19_Label_2>Estimated total bleeding amount</Option19_Label_2>
<Option19_Desc>The approximate bleeding amount.&#10;The normal bleeding amount of a human is about 20~80ml per cycle.</Option19_Desc>
<Option20_Label_1>Colonist</Option20_Label_1>
<Option20_Label_2>Prisoner</Option20_Label_2>
<Option20_Label_3>Allied Faction</Option20_Label_3>
<Option20_Label_4>Neutral</Option20_Label_4>
<Option20_Label_5>Hostile Faction</Option20_Label_5>
<Option21_Label>Target pawns:</Option21_Label>
<Option21_Desc>The gizmo and button will appear for these pawns</Option21_Desc>
<Option22_Label>Use hybrid extension</Option22_Label>
<Option22_Desc>Overrides RJW and RaceSupport's hybrid definition.&#10;Dominant hybrid extension determines whose definition used first. Not recommended to change this.</Option22_Desc>
<Option23_Label>Dominant hybrid extension</Option23_Label>
<Option23_Label_1></Option23_Label_1>
<Option23_Label_2></Option23_Label_2>
<Option_MaxBreastIncrementFactor_Label>Breast growth during pregnancy</Option_MaxBreastIncrementFactor_Label>
<Option_MaxBreastIncrementFactor_Desc>Change how much a pregnant pawn's breasts will grow when pregnant. Some pawns will grow more than others.</Option_MaxBreastIncrementFactor_Desc>
<Option_MaxNippleIncrementFactor_Label>Nipple change during pregnancy</Option_MaxNippleIncrementFactor_Label>
<Option_MaxNippleIncrementFactor_Desc>Change how much a pregnant pawn's nipples will change during pregnancy.</Option_MaxNippleIncrementFactor_Desc>
<Option_PermanentNippleChange_Label>Permanent nipple change after pregnancy</Option_PermanentNippleChange_Label>
<Option_PermanentNippleChange_Desc>Adjusts approximately how much of a pregnant pawn's nipples will remain changed after the pregnancy ends.</Option_PermanentNippleChange_Desc>
<Option28_Label>Customize Hybrids</Option28_Label>
<Option28_Tooltip>Open custom hybrid editor.&#10;This will overrides hybrid definitions of XML files.</Option28_Tooltip>
<Option29_Label>Allow shrink icon</Option29_Label>
<Option29_Desc>Let icon become smaller if needed.</Option29_Desc>
<Option30_Label>Egg lifespan multiplier</Option30_Label>
<Option30_Desc>Multiply egg's lifespan.&#10;All non-implanted eggs will die at end of luteal stage regardless of this setting.</Option30_Desc>
<Option31_Label>Enable vagina morph after birth</Option31_Label>
<Option31_Desc>Enable permanent vagina stretch after birth.&#10;If you are using another mod handling this, turn off this option.</Option31_Desc>
<Option32_Label>Morph power</Option32_Label>
<Option32_Desc>Set morph power.</Option32_Desc>
<Option_EnableGatherCumGizmo_Label>Enable gather cum gizmo</Option_EnableGatherCumGizmo_Label>
<Option_EstrusOverride_Label>Estrus overrides RJW hookup settings</Option_EstrusOverride_Label>
<Option_EstrusOverride_Desc>If enabled, a pawn in visible estrus will use these settings for potential impregnation hookups instead of the RJW settings.&#10;All settings default to their RJW counterparts.</Option_EstrusOverride_Desc>
<Option_EstrusFuckability_Label>Hookup minimum fuckability in estrus</Option_EstrusFuckability_Label>
<Option_EstrusAttractability_Label>Hookup minimum attractability in estrus</Option_EstrusAttractability_Label>
<Option_EstrusRelationship_Label>Hookup minimum opinion in estrus</Option_EstrusRelationship_Label>
<EstimatedCumLifespan>Estimated sperm lifespan</EstimatedCumLifespan>
<EstimatedEggLifespan>Estimated egg lifespan</EstimatedEggLifespan>
<OvulationChanceLabel>排卵 {0}</OvulationChanceLabel>
<OvulationChanceDesc>排卵時に各卵が放出される確率。</OvulationChanceDesc>
<FertilityDesc>受精卵の着床確率。&#10;この時間に受精する確率{0}%</FertilityDesc>
<Option_PregnancyFromBaseRJW_Label>Use basic RJW pregnancy</Option_PregnancyFromBaseRJW_Label>
<Option_PregnancyFromMultiplePregnancy_Label>Use menstruation multiple pregnancy</Option_PregnancyFromMultiplePregnancy_Label>
<Option_PregnancyFromBiotech_Label>Use Biotech pregnancy</Option_PregnancyFromBiotech_Label>
<Option_EnableBiotechTwins_Label>(EXPERIMENTAL) Enable multiple babies/twins in a single Biotech pregnancy.</Option_EnableBiotechTwins_Label>
<Option_EnableBiotechTwins_Desc>Enabling this option will allow identical and hetero ovular twins with Biotech.&#10;Also allows the hybrid system, but two humanlikes cannot produce an animal.</Option_EnableBiotechTwins_Desc>
<Option_EnableDraftedIcon_Label>Show womb status when drafted</Option_EnableDraftedIcon_Label>
<Option_EnableDraftedIcon_Desc>Draw womb icon for drafted pawns</Option_EnableDraftedIcon_Desc>
<Button_ResetToDefault>Reset to default</Button_ResetToDefault>
<Gizmo_GatherCum>精液を収集</Gizmo_GatherCum>
<FloatMenu_CleanSelf>膣を洗う</FloatMenu_CleanSelf>
<CustomHybrid_List_Title>Custom Hybrid Editor</CustomHybrid_List_Title>
<CustomHybrid_Title>Hybrids of {0}</CustomHybrid_Title>
<CustomHybrid_Tooltip>When {0} breed with {1}, {2} will be born at {3} chance.&#10;If both races have hybrid definitions for each other, the father's definition will be used.</CustomHybrid_Tooltip>
<CannotNoEggs>卵子がない</CannotNoEggs>
<CannotNoWomb>子宮が必要</CannotNoWomb>
<EggRestorationCompleted>{PAWN_labelShort} has completed {PAWN_possessive} egg restoration cycle.</EggRestorationCompleted>
</LanguageData>

Binary file not shown.

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<JobDef>
<defName>LactateSelf_MC</defName>
<driverClass>MilkModule.JobDriver_MilkSelf_MC</driverClass>
<reportString>lactating self</reportString>
<allowOpportunisticPrefix>true</allowOpportunisticPrefix>
</JobDef>
</Defs>

View file

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Alpha Genes</li>
</mods>
<match Class="PatchOperationAddModExtension">
<xpath>/Defs/GeneDef[defName="AG_Egglaying"]</xpath>
<value>
<li Class="RJW_Menstruation.MenstruationModExtension">
<disableCycle>true</disableCycle>
</li>
</value>
</match>
</Operation>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Vanilla Races Expanded - Saurid</li>
</mods>
<match Class="PatchOperationAddModExtension">
<xpath>/Defs/GeneDef[defName="VRESaurids_Oviparous"]</xpath>
<value>
<li Class="RJW_Menstruation.MenstruationModExtension">
<disableCycle>true</disableCycle>
</li>
</value>
</match>
</Operation>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Vanilla Races Expanded - Phytokin</li>
</mods>
<match Class="PatchOperationAddModExtension">
<xpath>/Defs/GeneDef[defName="VRE_SaplingBirth"]</xpath>
<value>
<li Class="RJW_Menstruation.MenstruationModExtension">
<disableCycle>true</disableCycle>
</li>
</value>
</match>
</Operation>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Erin's Corvyia</li>
</mods>
<match Class="PatchOperationAddModExtension">
<xpath>/Defs/GeneDef[defName="ERN_EggLayer"]</xpath>
<value>
<li Class="RJW_Menstruation.MenstruationModExtension">
<disableCycle>true</disableCycle>
</li>
</value>
</match>
</Operation>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Outland - Genetics</li>
</mods>
<match Class="PatchOperationAddModExtension">
<xpath>/Defs/GeneDef[defName="Outland_EggLayer"]</xpath>
<value>
<li Class="RJW_Menstruation.MenstruationModExtension">
<disableCycle>true</disableCycle>
</li>
</value>
</match>
</Operation>
</Patch>

View file

@ -144,5 +144,11 @@
</li>
</comps>
</value>
</Operation>
</Operation>
</Patch>

View file

@ -5,6 +5,8 @@ VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RJW_Menstruation", "RJW_Menstruation\RJW_Menstruation.csproj", "{EED2F3B9-8C20-4194-919E-8D151B29F70B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MilkModule", "MilkModule\MilkModule.csproj", "{3591B3C1-EB57-44BF-AB69-A613E097A7F8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -15,6 +17,10 @@ Global
{EED2F3B9-8C20-4194-919E-8D151B29F70B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EED2F3B9-8C20-4194-919E-8D151B29F70B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EED2F3B9-8C20-4194-919E-8D151B29F70B}.Release|Any CPU.Build.0 = Release|Any CPU
{3591B3C1-EB57-44BF-AB69-A613E097A7F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3591B3C1-EB57-44BF-AB69-A613E097A7F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3591B3C1-EB57-44BF-AB69-A613E097A7F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3591B3C1-EB57-44BF-AB69-A613E097A7F8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -144,13 +144,11 @@ namespace RJW_Menstruation
Scribe_Values.Look(ref baseAlpha, "baseAlpha", baseAlpha, true);
Scribe_Values.Look(ref baseAreola, "baseAreola", baseAreola, true);
Scribe_Values.Look(ref baseNipple, "baseNipple", baseNipple, true);
if (Scribe.mode == LoadSaveMode.PostLoadInit)
Initialize();
}
public bool ShouldSimulate()
{
if (!Pawn.ShouldCycle()) return false;
if (!Configurations.EnableAnimalCycle && Pawn.IsAnimal()) return false;
if (Pawn.SpawnedOrAnyParentSpawned || Pawn.IsCaravanMember() || PawnUtility.IsTravelingInTransportPodWorldObject(Pawn)) return true;
return false;

View file

@ -30,7 +30,7 @@ namespace RJW_Menstruation
switch (CurrentVisibleStage)
{
case Stage.Follicular:
return Translations.Stage_Follicular_Induced_Desc + (EggHealth < 1f ? " " + Translations.Stage_Climacteric_Desc : "");
return Translations.Stage_Follicular_Induced_Desc + (EggHealth < 1f ? Translations.Stage_Climacteric_Desc : "");
default:
return base.GetCurStageDesc;
}
@ -106,10 +106,19 @@ namespace RJW_Menstruation
protected override bool ShouldBeInEstrus()
{
if (curStage == Stage.Luteal && !hadOvulatoryStage) return false;
else return base.ShouldBeInEstrus();
if (!loaded)
Initialize();
switch (curStage)
{
case Stage.Follicular:
return curStageTicks > currentIntervalTicks - Props.estrusDaysBeforeOvulation * GenDate.TicksPerDay;
case Stage.Ovulatory:
return true;
case Stage.Luteal:
return hadOvulatoryStage && curStageTicks < EggLifespanTicks;
default:
return false;
}
}
protected override float RandomOvulationChance => 0;
}
}

View file

@ -127,6 +127,7 @@ namespace RJW_Menstruation
protected float implantationChanceCache = -1.0f;
protected int opcache = -1;
protected float antisperm = 0.0f;
protected float? originvagsize = null;
// RJW pregnancy, or Biotech pregnancy/labor/laborpushing
protected Hediff pregnancy = null;
@ -178,8 +179,7 @@ namespace RJW_Menstruation
public float HoursBetweenSimulations => (float)TickInterval / GenDate.TicksPerHour;
public Hediff Pregnancy
{
public Hediff Pregnancy {
get
{
if (pregnancy == null) return null;
@ -198,9 +198,20 @@ namespace RJW_Menstruation
get
{
if (opcache > 0) return opcache;
float avglittersize;
try
{
avglittersize = Mathf.Max(Rand.ByCurveAverage(Pawn.RaceProps.litterSizeCurve), 1.0f);
}
catch
{
// Any exceptions in that will have been reported elsewhere in the code by now
avglittersize = 1.0f;
};
avglittersize *= ovulationFactor;
const float yearsBeforeMenopause = 6.0f;
opcache = (int)(RaceCyclesPerYear() *
AverageLitterSize() *
avglittersize *
yearsBeforeMenopause *
(Pawn.RaceProps.lifeExpectancy / ThingDefOf.Human.race.lifeExpectancy));
if (opcache == 0) opcache = 1;
@ -255,7 +266,7 @@ namespace RJW_Menstruation
public float TotalCum
{
get => cums?.Sum(cum => cum.Volume) ?? 0;
get => cums?.Sum(cum => cum.Volume) ?? 0;
}
public float TotalFertCum
{
@ -279,7 +290,7 @@ namespace RJW_Menstruation
{
get
{
if (Pawn.IsBreeder()) return 0.5f;
if (QuirkUtility.HasQuirk(Pawn, QuirkUtility.Quirks.Breeder)) return 0.5f;
return 1.0f;
}
@ -289,7 +300,7 @@ namespace RJW_Menstruation
private bool calculatingOvulationChance = false;
public bool CalculatingOvulationChance { get => calculatingOvulationChance; }
protected float CalculatedOvulationChance()
protected float CalcuatedOvulationChance()
{
float ovulationChance = 1.0f;
if (EggHealth <= 0.0f) return 0.0f;
@ -297,14 +308,20 @@ namespace RJW_Menstruation
if (ModsConfig.BiotechActive && xxx.is_human(Pawn))
{
if (Pawn.SterileGenes()) return 0.0f;
// Replicate how rjw.PawnCapacityWorker_Fertility.CalculateCapacityLevel does it, but without the age factor
if (!Pawn.RaceHasFertility()) return 0.0f;
if (AndroidsCompatibility.IsAndroid(Pawn) && parent.def != Genital_Helper.archotech_vagina) return 0.0f;
float ageFactor = 1.0f;
StatDefOf.Fertility.GetStatPart<StatPart_FertilityByGenderAge>()?.TransformValue(StatRequest.For(Pawn), ref ageFactor);
if (ageFactor <= 0.0f) return 0.0f; // Too young or too old
if (Pawn.IsBreeder()) ovulationChance *= 10.0f;
foreach (var part in StatDefOf.Fertility.parts)
{
if(part is StatPart_FertilityByGenderAge fertilityByAge)
{
float factor = 1.0f;
fertilityByAge.TransformValue(StatRequest.For(Pawn), ref factor);
if (factor <= 0.0f) return 0.0f; // Too young or too old
}
else part.TransformValue(StatRequest.For(Pawn), ref ovulationChance);
}
if (Pawn.HasQuirk(QuirkUtility.Quirks.Breeder)) ovulationChance *= 10.0f;
try
{
calculatingOvulationChance = true;
@ -315,20 +332,20 @@ namespace RJW_Menstruation
return ovulationChance;
}
protected float CalculatedImplantChance()
protected float CalcuatedImplantChance()
{
float factor = 1.0f;
if (ModsConfig.BiotechActive && xxx.is_human(Pawn))
{
// Implant factor will be based solely on pawn age, plus any rollover from ovulation chance
float factor = 1.0f;
StatDefOf.Fertility.GetStatPart<StatPart_FertilityByGenderAge>()?.TransformValue(StatRequest.For(Pawn), ref factor);
if (factor <= 0.0f) return 0.0f;
StatPart_FertilityByGenderAge fertilityStatPart = StatDefOf.Fertility.GetStatPart<StatPart_FertilityByGenderAge>();
fertilityStatPart?.TransformValue(StatRequest.For(Pawn), ref factor);
if (OvulationChance > 1.0f) factor *= OvulationChance;
return Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
else
{
return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier;
return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
}
@ -336,17 +353,16 @@ namespace RJW_Menstruation
{
get
{
if (ovulationChanceCache < 0.0f) ovulationChanceCache = CalculatedOvulationChance();
if (ovulationChanceCache < 0.0f) ovulationChanceCache = CalcuatedOvulationChance();
return ovulationChanceCache;
}
}
// Before configuration setting
public float ImplantChance
{
get
{
if (implantationChanceCache < 0.0f) implantationChanceCache = CalculatedImplantChance();
if (implantationChanceCache < 0.0f) implantationChanceCache = CalcuatedImplantChance();
return implantationChanceCache;
}
}
@ -564,6 +580,19 @@ namespace RJW_Menstruation
}
}
public float OriginVagSize
{
get
{
if (originvagsize == null)
{
originvagsize = parent.Severity;
}
return originvagsize ?? 0.1f;
}
set => originvagsize = value;
}
public int CurStageIntervalTicks
{
get => currentIntervalTicks;
@ -596,7 +625,7 @@ namespace RJW_Menstruation
else if (Pawn.story?.bodyType == BodyTypeDefOf.Female) discoveryTime = 0.35f;
// Estimated; there's no way to get the exact value after the fact without writing it into the save
float lutealProgressWhenImplanted = Math.Min(0.5f, maxImplantDelayHours / (Props.lutealIntervalDays * GenDate.HoursPerDay));
return GenMath.LerpDouble(0, discoveryTime, lutealProgressWhenImplanted, 1.0f, pregnancy.Severity);
}
}
@ -644,10 +673,9 @@ namespace RJW_Menstruation
Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true);
Scribe_Values.Look(ref eggstack, "eggstack", 0);
Scribe_Values.Look(ref estrusflag, "estrusflag", false);
Scribe_Values.Look(ref originvagsize, "originvagsize", originvagsize, true);
Scribe_Values.Look(ref DoCleanWomb, "DoCleanWomb", false);
Scribe_References.Look(ref pregnancy, "pregnancy");
if (Scribe.mode == LoadSaveMode.PostLoadInit)
Initialize();
}
@ -665,24 +693,25 @@ namespace RJW_Menstruation
estrusLevel = Props.concealedEstrus ? EstrusLevel.Concealed : EstrusLevel.Visible;
ovulationFactor = 1f;
noBleeding = false;
opcache = -1;
if (Pawn.genes == null || !ModsConfig.BiotechActive) return;
foreach (MenstruationModExtension extension in Pawn.genes.GenesListForReading.Select(gene => gene.def.GetModExtension<MenstruationModExtension>()).Where(ext => ext != null))
{
eggLifeSpanTicks = (int)(eggLifeSpanTicks * extension.eggLifeTimeFactor);
if (extension.alwaysEstrus) estrusLevel = EstrusLevel.Visible;
else if (extension.neverEstrus) estrusLevel = EstrusLevel.None;
ovulationFactor *= extension.ovulationFactor;
if (extension.noBleeding) noBleeding = true;
}
if (eggLifeSpanTicks < 0) eggLifeSpanTicks = 0;
if (ovulationFactor < 0f) ovulationFactor = 0f;
if (Pawn.genes.HasGene(VariousDefOf.ShortEggLifetime)) eggLifeSpanTicks = eggLifeSpanTicks * 3 / 4;
else if (Pawn.genes.HasGene(VariousDefOf.DoubleEggLifetime)) eggLifeSpanTicks *= 2;
else if (Pawn.genes.HasGene(VariousDefOf.QuadEggLifetime)) eggLifeSpanTicks *= 4;
if (Pawn.genes.HasGene(VariousDefOf.NeverEstrus)) estrusLevel = EstrusLevel.None;
else if (Pawn.genes.HasGene(VariousDefOf.FullEstrus)) estrusLevel = EstrusLevel.Visible;
if (Pawn.genes.HasGene(VariousDefOf.DoubleOvulation)) ovulationFactor = 2f;
else if (Pawn.genes.HasGene(VariousDefOf.QuadOvulation)) ovulationFactor = 4f;
noBleeding = Pawn.genes.HasGene(VariousDefOf.NoBleeding);
}
public bool ShouldSimulate()
{
if (!Pawn.ShouldCycle()) return false;
if (!Configurations.EnableAnimalCycle && Pawn.IsAnimal()) return false;
if (Pawn.SpawnedOrAnyParentSpawned || Pawn.IsCaravanMember() || PawnUtility.IsTravelingInTransportPodWorldObject(Pawn)) return true;
return false;
@ -704,9 +733,6 @@ namespace RJW_Menstruation
// If an exception makes it out, RW will remove the hediff, so catch it here
try
{
if (Pawn.IsHashIntervalTick(recalculateTickInterval)) TickInterval = -1; // Every so often, force TickInterval to be recalculated in case the pawn's status changed.
if (!Pawn.IsHashIntervalTick(TickInterval)) return;
if (!ShouldSimulate()) return;
// Initialize immediately if needed, but if there's an error, then don't spam it every tick
@ -716,6 +742,9 @@ namespace RJW_Menstruation
Initialize();
}
if (Pawn.IsHashIntervalTick(recalculateTickInterval)) TickInterval = -1; // Every so often, force TickInterval to be recalculated in case the pawn's status changed.
if (!Pawn.IsHashIntervalTick(TickInterval)) return;
if (initError) Log.Warning($"Attempting to process {Pawn}'s womb uninitialized");
if (Pregnancy != null && curStage != Stage.Pregnant)
@ -725,7 +754,7 @@ namespace RJW_Menstruation
}
BeforeSimulator();
if (ShouldBeInfertile()) GoNextStage(Stage.Infertile);
switch (curStage)
{
@ -802,7 +831,7 @@ namespace RJW_Menstruation
tip.Append(": ");
tip.Append(GetCurStageLabel);
string fertInfo = GetFertilizingInfo;
if (CurrentVisibleStage == Stage.Luteal && fertInfo.Length > 0)
if(CurrentVisibleStage == Stage.Luteal && fertInfo.Length > 0)
{
tip.AppendLine();
tip.Append(fertInfo);
@ -813,7 +842,7 @@ namespace RJW_Menstruation
protected virtual int TicksToNextStage()
{
return Math.Max(0, (currentIntervalTicks - curStageTicks) / Configurations.CycleAcceleration);
return Math.Max(0,(currentIntervalTicks - curStageTicks) / Configurations.CycleAcceleration);
}
public override string CompDebugString()
@ -858,8 +887,8 @@ namespace RJW_Menstruation
if (!precum && fertility > 0 && IsDangerDay && cummer.relations.GetPregnancyApproachForPartner(Pawn) == PregnancyApproach.AvoidPregnancy)
{
float successChance = pulloutSuccessRate;
if (cummer.HasImpregnationFetish()) successChance *= fetishPulloutSuccessModifier;
if (Pawn.HasImpregnationFetish()) successChance *= fetishPulloutSuccessModifier;
if (cummer.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish)) successChance *= fetishPulloutSuccessModifier;
if (Pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish)) successChance *= fetishPulloutSuccessModifier;
if (Rand.Chance(successChance)) return;
}
if (Pawn.HasIUD()) fertility /= 100f;
@ -871,7 +900,7 @@ namespace RJW_Menstruation
bool merged = false;
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (cum.pawn?.Equals(cummer) ?? false)
if (cum.pawn.Equals(cummer))
{
cum.MergeWithCum(volume, fertility);
merged = true;
@ -886,7 +915,7 @@ namespace RJW_Menstruation
bool merged = false;
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (cum.pawn?.Equals(cummer) ?? false)
if (cum.pawn.Equals(cummer))
{
cum.MergeWithCum(volume, fertility);
merged = true;
@ -923,7 +952,7 @@ namespace RJW_Menstruation
bool merged = false;
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (cum.notcum && (cum.pawn?.Equals(cummer) ?? false) && cum.notcumLabel.Equals(notcumlabel))
if (cum.notcum && cum.pawn.Equals(cummer) && cum.notcumLabel.Equals(notcumlabel))
{
cum.MergeWithFluid(volume, decayresist, filthdef);
merged = true;
@ -938,7 +967,7 @@ namespace RJW_Menstruation
bool merged = false;
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (cum.notcum && (cum.pawn?.Equals(cummer) ?? false) && cum.notcumLabel.Equals(notcumlabel))
if (cum.notcum && cum.pawn.Equals(cummer) && cum.notcumLabel.Equals(notcumlabel))
{
cum.MergeWithFluid(volume, decayresist, filthdef);
merged = true;
@ -1158,7 +1187,7 @@ namespace RJW_Menstruation
if (cycleSpeed < 0f) cycleSpeed = Utility.RandGaussianLike(0.8f, 1.2f);
if (cycleVariability < 0f) cycleVariability = MenstruationUtility.RandomVariabilityPercent();
InitOvary();
if (currentIntervalTicks < 0)
@ -1192,21 +1221,6 @@ namespace RJW_Menstruation
{
}
protected float AverageLitterSize()
{
float avglittersize;
try
{
avglittersize = Mathf.Max(Rand.ByCurveAverage(Pawn.RaceProps.litterSizeCurve), 1.0f);
}
catch (NullReferenceException)
{
avglittersize = 1.0f;
}
avglittersize *= ovulationFactor;
return avglittersize;
}
protected virtual float RaceCyclesPerYear()
{
int breedingSeasons = 0;
@ -1229,7 +1243,16 @@ namespace RJW_Menstruation
public int GetOvaryPowerByAge()
{
float avglittersize = AverageLitterSize();
float avglittersize;
try
{
avglittersize = Mathf.Max(Rand.ByCurveAverage(Pawn.RaceProps.litterSizeCurve), 1.0f);
}
catch (NullReferenceException)
{
avglittersize = 1.0f;
}
avglittersize *= ovulationFactor;
float fertStartAge = Pawn.RaceProps.lifeStageAges?.Find(stage => stage.def.reproductive)?.minAge ?? 0.0f;
float fertEndAge = Pawn.RaceProps.lifeExpectancy * (Pawn.IsAnimal() ? RJWPregnancySettings.fertility_endage_female_animal : RJWPregnancySettings.fertility_endage_female_humanlike);
@ -1346,7 +1369,7 @@ namespace RJW_Menstruation
//float fertFailChancePerHour = Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor);
//float fertFailChancePerInterval = Mathf.Pow(fertFailChancePerHour, (float)TickInterval / GenDate.TicksPerHour);
float fertFailChancePerInterval = Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor * HoursBetweenSimulations);
if (Rand.Chance(fertFailChancePerInterval)) return null;
Pawn.records.AddTo(VariousDefOf.AmountofFertilizedEggs, 1);
@ -1389,116 +1412,97 @@ namespace RJW_Menstruation
}
else if (Rand.Chance(Configurations.ImplantationChance * ImplantChance * InterspeciesImplantFactor(egg.fertilizer)))
{
try
if (Configurations.Debug) Log.Message($"Implanting fertilized egg of {Pawn} into {parent}, father {egg.fertilizer}");
if (pregnancy != null)
{
if (Configurations.Debug) Log.Message($"Implanting fertilized egg of {Pawn} into {parent}, father {egg.fertilizer}");
if (pregnancy == null)
if (Configurations.PregnancySource == Configurations.PregnancyType.Biotech && Configurations.EnableBiotechTwins && Configurations.EnableHeteroOvularTwins)
{
Configurations.PregnancyType usePregnancy = xxx.is_human(Pawn) ? Configurations.PregnancySource : Configurations.PregnancyType.MultiplePregnancy;
switch (usePregnancy)
if (Configurations.Debug) Log.Message($"Adding to existing Biotech pregnancy {pregnancy}");
HediffComp_PregeneratedBabies comp = pregnancy.TryGetComp<HediffComp_PregeneratedBabies>();
if (comp == null) Log.Warning($"Trying to add Biotech egg to {Pawn}'s pregnancy without a pregenerated baby comp: {pregnancy}");
else
{
case Configurations.PregnancyType.BaseRJW:
if (Configurations.Debug) Log.Message($"Creating new base RJW pregnancy");
PregnancyHelper.AddPregnancyHediff(Pawn, egg.fertilizer);
// I hate having to do this, but it gets the newest pregnancy
List<Hediff_BasePregnancy> pregnancies = new List<Hediff_BasePregnancy>();
Pawn.health.hediffSet.GetHediffs(ref pregnancies);
pregnancy = pregnancies.MaxBy(hediff => hediff.loadID);
pregnant = true;
break;
case Configurations.PregnancyType.MultiplePregnancy:
if (Configurations.Debug) Log.Message($"Creating new menstruation pregnancy");
pregnancy = Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(Pawn, egg.fertilizer);
pregnant = true;
deadeggs.Add(egg);
break;
case Configurations.PregnancyType.Biotech:
if (Configurations.Debug) Log.Message($"Creating new biotech pregnancy");
pregnancy = HediffMaker.MakeHediff(HediffDefOf.PregnantHuman, Pawn);
if (Configurations.EnableBiotechTwins)
pregnancy.TryGetComp<HediffComp_PregeneratedBabies>().AddNewBaby(Pawn, egg.fertilizer);
((Hediff_Pregnant)pregnancy).SetParents(Pawn, egg.fertilizer, PregnancyUtility.GetInheritedGeneSet(egg.fertilizer, Pawn));
Pawn.health.AddHediff(pregnancy);
pregnant = true;
deadeggs.Add(egg);
break;
comp.AddNewBaby(Pawn, egg.fertilizer);
pregnant = true;
deadeggs.Add(egg);
}
if (pregnancy is Hediff_BasePregnancy rjw_preg)
}
else if (Configurations.PregnancySource == Configurations.PregnancyType.MultiplePregnancy && Configurations.EnableHeteroOvularTwins)
{
if (pregnancy is Hediff_MultiplePregnancy h)
{
// TODO: advance biotech pregnancy
rjw_preg.p_start_tick -= egg.ticksSinceFertilization / Configurations.CycleAcceleration;
rjw_preg.p_end_tick -= egg.ticksSinceFertilization / Configurations.CycleAcceleration;
if (Configurations.Debug) Log.Message($"Adding to existing pregnancy {h}");
h.AddNewBaby(Pawn, egg.fertilizer);
}
pregnant = true;
deadeggs.Add(egg);
}
else
{
switch (pregnancy)
{
case Hediff_Pregnant vanillaPreg: // Not going to do the labor ones
if (!Configurations.EnableBiotechTwins || !Configurations.EnableHeteroOvularTwins) goto default;
if (Configurations.Debug) Log.Message($"Adding to existing Biotech pregnancy {vanillaPreg.GetUniqueLoadID()}");
HediffComp_PregeneratedBabies comp = vanillaPreg.TryGetComp<HediffComp_PregeneratedBabies>();
if (comp == null) Log.Warning($"Trying to add Biotech egg to {Pawn}'s pregnancy without a pregenerated baby comp: {vanillaPreg.GetUniqueLoadID()}");
else
comp.AddNewBaby(Pawn, egg.fertilizer);
pregnant = true;
deadeggs.Add(egg);
break;
case Hediff_MultiplePregnancy multiPreg:
if (!Configurations.EnableHeteroOvularTwins) goto default;
if (Configurations.Debug) Log.Message($"Adding to existing pregnancy {multiPreg.GetUniqueLoadID()}");
multiPreg.AddNewBaby(Pawn, egg.fertilizer);
pregnant = true;
deadeggs.Add(egg);
break;
case Hediff_BasePregnancy _:
default:
pregnant = true;
deadeggs.Add(egg);
break;
}
pregnant = true;
break;
}
}
catch (Exception ex)
else
{
Log.Error($"Error creating pregnancy in {Pawn}'s womb, father {egg.fertilizer}: {ex}");
TakeLoosePregnancy();
deadeggs.Add(egg);
Configurations.PregnancyType usePregnancy = xxx.is_human(Pawn) ? Configurations.PregnancySource : Configurations.PregnancyType.MultiplePregnancy;
switch (usePregnancy)
{
case Configurations.PregnancyType.BaseRJW:
if (Configurations.Debug) Log.Message($"Creating new base RJW pregnancy");
PregnancyHelper.AddPregnancyHediff(Pawn, egg.fertilizer);
// I hate having to do this, but it gets the newest pregnancy
List<Hediff_BasePregnancy> pregnancies = new List<Hediff_BasePregnancy>();
Pawn.health.hediffSet.GetHediffs(ref pregnancies);
pregnancy = pregnancies.MaxBy(hediff => hediff.loadID);
pregnant = true;
break;
case Configurations.PregnancyType.MultiplePregnancy:
if (Configurations.Debug) Log.Message($"Creating new menstruation pregnancy");
pregnancy = Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(Pawn, egg.fertilizer);
pregnant = true;
deadeggs.Add(egg);
break;
case Configurations.PregnancyType.Biotech:
if (Configurations.Debug) Log.Message($"Creating new biotech pregnancy");
pregnancy = HediffMaker.MakeHediff(HediffDefOf.PregnantHuman, Pawn);
if(Configurations.EnableBiotechTwins)
pregnancy.TryGetComp<HediffComp_PregeneratedBabies>().AddNewBaby(Pawn, egg.fertilizer);
((Hediff_Pregnant)pregnancy).SetParents(Pawn, egg.fertilizer, PregnancyUtility.GetInheritedGeneSet(egg.fertilizer, Pawn));
Pawn.health.AddHediff(pregnancy);
pregnant = true;
deadeggs.Add(egg);
break;
}
if (pregnancy is Hediff_BasePregnancy rjw_preg)
{
// TODO: advance biotech pregnancy
rjw_preg.p_start_tick -= egg.ticksSinceFertilization / Configurations.CycleAcceleration;
rjw_preg.p_end_tick -= egg.ticksSinceFertilization / Configurations.CycleAcceleration;
}
}
}
else
{
{
if (Configurations.Debug)
{
float interspeciesFactor = InterspeciesImplantFactor(egg.fertilizer);
float implantChance = Configurations.ImplantationChance * ImplantChance * interspeciesFactor;
Log.Message($"Fertilized egg of {Pawn} failed to implant (chance {implantChance.ToStringPercent()}, " +
(interspeciesFactor < 1.0f ? $"interspecies factor {interspeciesFactor.ToStringPercent()}, " : "") +
$"father {egg.fertilizer})");
float implantChance = Configurations.ImplantationChance * ImplantChance * InterspeciesImplantFactor(egg.fertilizer);
Log.Message($"Fertilized egg of {Pawn} failed to implant (chance {implantChance.ToStringPercent()}, father {egg.fertilizer})");
}
deadeggs.Add(egg);
}
}
bool clearAllEggs = true;
switch (Configurations.PregnancySource)
if (pregnant &&
(Configurations.PregnancySource != Configurations.PregnancyType.MultiplePregnancy || !Configurations.EnableHeteroOvularTwins) &&
(Configurations.PregnancySource != Configurations.PregnancyType.Biotech || !Configurations.EnableBiotechTwins || !Configurations.EnableHeteroOvularTwins))
{
case Configurations.PregnancyType.BaseRJW:
clearAllEggs = true;
break;
case Configurations.PregnancyType.MultiplePregnancy:
clearAllEggs = !Configurations.EnableHeteroOvularTwins;
break;
case Configurations.PregnancyType.Biotech:
clearAllEggs = !(Configurations.EnableBiotechTwins && Configurations.EnableHeteroOvularTwins);
break;
}
if (pregnant && clearAllEggs)
eggs.Clear();
return true;
}
else
eggs.RemoveAll(egg => deadeggs.Contains(egg));
return pregnant;
@ -1548,7 +1552,12 @@ namespace RJW_Menstruation
return amount;
}
absorber.absorbedfluids += amount;
absorber.CheckDirty();
if (absorber.absorbedfluids > absorbable && !Pawn.apparel.IsLocked(absorber))
{
absorber.def = absorber.DirtyDef;
//absorber.fluidColor = GetCumMixtureColor;
absorber.dirty = true;
}
return 0;
}
@ -1562,6 +1571,9 @@ namespace RJW_Menstruation
return amount;
}
protected void EggDecay()
{
HashSet<Egg> deadeggs = new HashSet<Egg>();
@ -1587,11 +1599,6 @@ namespace RJW_Menstruation
Pawn.health.AddHediff(hediff, parent.Part);
}
protected void AdvanceStageTime()
{
curStageTicks += TickInterval * Configurations.CycleAcceleration;
}
protected virtual void FollicularAction()
{
if (!IsBreedingSeason())
@ -1606,12 +1613,13 @@ namespace RJW_Menstruation
}
else
{
AdvanceStageTime();
curStageTicks += TickInterval * Configurations.CycleAcceleration;
if (!estrusflag && curStageTicks > currentIntervalTicks - Props.estrusDaysBeforeOvulation * GenDate.TicksPerDay)
{
estrusflag = true;
SetEstrus();
}
StayCurrentStage();
}
}
@ -1619,7 +1627,7 @@ namespace RJW_Menstruation
{
if (curStageTicks < currentIntervalTicks)
{
AdvanceStageTime();
curStageTicks += TickInterval * Configurations.CycleAcceleration;
return;
}
estrusflag = false;
@ -1634,11 +1642,11 @@ namespace RJW_Menstruation
}
catch (ArgumentException e)
{
Log.WarningOnce($"Invalid litterSizeCurve for {Pawn.def}: {e}", 642201874 + Pawn.thingIDNumber);
Log.Warning($"Invalid litterSizeCurve for {Pawn.def}: {e}");
eggnum = 1f;
}
eggnum *= ovulationFactor;
int toOvulate = Math.Max(1, (int)eggnum + eggstack);
int toOvulate = (int)eggnum + eggstack;
int ovulated = 0;
for (int i = 0; i < toOvulate; i++)
@ -1649,7 +1657,7 @@ namespace RJW_Menstruation
}
ovarypower -= ovulated;
eggstack = 0;
if (Configurations.Debug && ovulated < toOvulate)
if (Configurations.Debug && ovulated != toOvulate)
Log.Message($"{Pawn} ovulated {ovulated}/{toOvulate} eggs ({OvulationChance.ToStringPercent()} chance)");
GoNextStage(Stage.Luteal);
@ -1679,19 +1687,21 @@ namespace RJW_Menstruation
}
else
{
AdvanceStageTime();
curStageTicks += TickInterval * Configurations.CycleAcceleration;
StayCurrentStage();
}
}
else
{
AdvanceStageTime();
curStageTicks += TickInterval * Configurations.CycleAcceleration;
StayCurrentStage();
}
}
protected virtual void BleedingAction()
{
if (curStageTicks >= currentIntervalTicks || noBleeding)
if (curStageTicks >= currentIntervalTicks)
{
Hediff hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp);
if (hediff != null && !Pawn.GetMenstruationComps().Any(comp => comp != this && comp.curStage == Stage.Bleeding)) Pawn.health.RemoveHediff(hediff);
@ -1700,13 +1710,15 @@ namespace RJW_Menstruation
GoOvulatoryStage();
else
{
GoNextStage(Stage.Follicular, totalFollicularTicks - currentIntervalTicks); // I.e., the remaining follicular time equals the total minus the bleeding time elapsed
currentIntervalTicks = totalFollicularTicks - currentIntervalTicks; // I.e., the remaining follicular time equals the total minus the bleeding time elapsed
GoNextStage(Stage.Follicular, false);
}
}
else
{
if (curStageTicks < currentIntervalTicks / 4) BleedOut();
AdvanceStageTime();
curStageTicks += TickInterval * Configurations.CycleAcceleration;
StayCurrentStage();
}
}
@ -1719,10 +1731,16 @@ namespace RJW_Menstruation
Implant();
}
if (Pregnancy != null)
if (pregnancy != null && Pawn.health.hediffSet.hediffs.Contains(pregnancy))
{
curStageTicks += TickInterval;
StayCurrentStageConst(Stage.Pregnant);
}
else
{
if (pregnancy != null) pregnancy = null;
GoNextStage(Stage.Recover);
}
}
protected virtual void RecoverAction()
@ -1744,18 +1762,22 @@ namespace RJW_Menstruation
}
else
{
AdvanceStageTime();
curStageTicks += TickInterval * Configurations.CycleAcceleration;
StayCurrentStage();
}
}
protected virtual void InfertileAction()
{
if (ShouldBeInfertile())
return;
else if (IsBreedingSeason())
GoNextStage(Stage.Follicular);
{
StayCurrentStageConst(Stage.Infertile);
}
else
GoNextStage(Stage.Anestrus);
{
bool breedingSeason = IsBreedingSeason();
GoNextStage(breedingSeason ? Stage.Follicular : Stage.Anestrus, breedingSeason);
}
}
protected virtual void AnestrusAction()
@ -1764,6 +1786,10 @@ namespace RJW_Menstruation
{
GoFollicularOrBleeding();
}
else
{
StayCurrentStage();
}
}
protected virtual void ThoughtCumInside(Pawn cummer)
@ -1773,7 +1799,7 @@ namespace RJW_Menstruation
MemoryThoughtHandler cummerMemories = cummer.needs.mood.thoughts.memories;
MemoryThoughtHandler pawnMemories = Pawn.needs.mood.thoughts.memories;
if (cummer.IsProPregnancy(out Precept preceptm) || (cummer.IsTeratophile() != (Pawn.GetStatValue(StatDefOf.PawnBeauty) >= 0)))
if (cummer.IsProPregnancy(out Precept preceptm) || (cummer.HasQuirk(QuirkUtility.Quirks.Teratophile) != (Pawn.GetStatValue(StatDefOf.PawnBeauty) >= 0)))
{
if (cummer.relations.OpinionOf(Pawn) <= -5)
cummerMemories.TryGainMemory(VariousDefOf.HaterCameInsideM, Pawn);
@ -1796,10 +1822,10 @@ namespace RJW_Menstruation
}
else pawnMemories.TryGainMemory(VariousDefOf.CameInsideFFetish, cummer);
}
else if (Pawn.relations.OpinionOf(cummer) <= -5)
pawnMemories.TryGainMemory(VariousDefOf.HaterCameInsideF, cummer);
else if (Pawn.IsInEstrus() && Pawn.relations.OpinionOf(cummer) < RJWHookupSettings.MinimumRelationshipToHookup)
pawnMemories.TryGainMemory(VariousDefOf.HaterCameInsideFEstrus, cummer);
else if (Pawn.relations.OpinionOf(cummer) <= -5)
pawnMemories.TryGainMemory(VariousDefOf.HaterCameInsideF, cummer);
else if (Pawn.IsInEstrus() && Pawn.relations.OpinionOf(cummer) < RJWHookupSettings.MinimumRelationshipToHookup)
pawnMemories.TryGainMemory(VariousDefOf.HaterCameInsideFEstrus, cummer);
else if (!Pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, cummer) && !Pawn.relations.DirectRelationExists(PawnRelationDefOf.Fiance, cummer))
{
if (Pawn.health.capacities.GetLevel(xxx.reproduction) < 0.50f) pawnMemories.TryGainMemory(VariousDefOf.CameInsideFLowFert, cummer);
@ -1825,10 +1851,10 @@ namespace RJW_Menstruation
TaleRecorder.RecordTale(VariousDefOf.TaleCameInside, new object[] { cummer, Pawn });
}
public void GoNextStage(Stage nextstage, int? stageTicks = null)
public void GoNextStage(Stage nextstage, bool calculateHours = true)
{
curStageTicks = 0;
currentIntervalTicks = stageTicks ?? PeriodRandomizer(nextstage);
if (calculateHours) currentIntervalTicks = PeriodRandomizer(nextstage);
curStage = nextstage;
}
@ -1837,6 +1863,16 @@ namespace RJW_Menstruation
GoNextStage(Stage.Ovulatory);
}
//stage can be interrupted in other reasons
protected void StayCurrentStage()
{
}
//stage never changes
protected void StayCurrentStageConst(Stage curstage)
{
}
protected void GoFollicularOrBleeding()
{
if (Props.bleedingIntervalDays == 0 || noBleeding)
@ -1896,13 +1932,10 @@ namespace RJW_Menstruation
else return Rand.Range(0.6f, 1.0f);
}
protected virtual float RandomOvulationChance => (float)Props.ovulationIntervalHours / GenDate.HoursPerDay;
protected Stage RandomStage()
{
Stage stage = Rand.ElementByWeight(
Stage.Follicular, Props.follicularIntervalDays - Props.bleedingIntervalDays,
Stage.Ovulatory, RandomOvulationChance,
Stage.Luteal, Props.lutealIntervalDays,
Stage.Bleeding, Props.bleedingIntervalDays);
@ -1911,9 +1944,6 @@ namespace RJW_Menstruation
case Stage.Follicular:
curStageTicks = Rand.Range(0, (Props.follicularIntervalDays - Props.bleedingIntervalDays) * GenDate.TicksPerDay);
break;
case Stage.Ovulatory:
curStageTicks = Rand.Range(0, Props.ovulationIntervalHours * GenDate.TicksPerHour);
break;
case Stage.Luteal:
curStageTicks = Rand.Range(0, Props.lutealIntervalDays * GenDate.TicksPerDay);
break;
@ -1953,7 +1983,7 @@ namespace RJW_Menstruation
public int EggsRestoredPerBiosculptor(float yearsWorth)
{
return Math.Max(1, (int)(RaceCyclesPerYear() * yearsWorth * AverageLitterSize()));
return Math.Max(1, (int)((float)RaceCyclesPerYear() * yearsWorth));
}
public void RestoreEggs(float yearsWorth)
@ -1972,7 +2002,7 @@ namespace RJW_Menstruation
public Egg()
{
fertilized = false;
lifeSpanTicks = (int)(VariousDefOf.HumanVaginaCompProperties.eggLifespanDays * GenDate.TicksPerDay * Configurations.EggLifespanMultiplier);
lifeSpanTicks = (int)(96 * GenDate.TicksPerHour * Configurations.EggLifespanMultiplier);
fertilizer = null;
ageTicks = 0;
}
@ -2014,6 +2044,28 @@ namespace RJW_Menstruation
public class HediffComp_Anus : HediffComp
{
public CompProperties_Anus Props => (CompProperties_Anus)props;
protected float? originanussize;
public float OriginAnusSize
{
get
{
if (originanussize == null)
{
originanussize = parent.Severity;
}
return originanussize ?? 0.1f;
}
}
public override void CompExposeData()
{
base.CompExposeData();
Scribe_Values.Look(ref originanussize, "originanussize", originanussize, true);
}
public override void CompPostTick(ref float severityAdjustment)
{
}
}
}

View file

@ -29,14 +29,14 @@ namespace RJW_Menstruation
protected override void InitializeExtraValues()
{
base.InitializeExtraValues();
base.InitializeExtraValues();
if (averageCycleIntervalTicks < 0)
{
averageCycleIntervalTicks = (int)(Props.cycleIntervalDays.RandomInRange * GenDate.TicksPerDay / cycleSpeed);
if (ticksToNextCycle < -50000)
ticksToNextCycle = Rand.Range(0, averageCycleIntervalTicks);
// Make the cutoff halfway into cycle, just to be sure there isn't a double-cycle the first time
if ((curStage == Stage.Follicular || curStage == Stage.Ovulatory || curStage == Stage.Luteal || curStage == Stage.Bleeding)
if ((curStage == Stage.Follicular || curStage == Stage.Luteal || curStage == Stage.Bleeding)
&& (averageCycleIntervalTicks - ticksToNextCycle) / 2 >= GenDate.TicksPerDay * (Props.follicularIntervalDays + Props.lutealIntervalDays) / cycleSpeed)
GoNextStage(Stage.Anestrus);
}
@ -73,7 +73,7 @@ namespace RJW_Menstruation
protected override int TicksToNextStage()
{
if (curStage == Stage.Anestrus && ticksToNextCycle > 0) return ticksToNextCycle / Configurations.CycleAcceleration;
if (curStage == Stage.Anestrus && ticksToNextCycle > 0) return ticksToNextCycle / Configurations.CycleAcceleration;
else return base.TicksToNextStage();
}
@ -104,11 +104,13 @@ namespace RJW_Menstruation
protected override void AnestrusAction()
{
if (ticksToNextCycle <= 0 && IsBreedingSeason())
if (ticksToNextCycle <= 0)
{
ticksToNextCycle = (int)(averageCycleIntervalTicks * (1 + Rand.Range(-cycleVariability, cycleVariability)));
GoNextStage(Stage.Follicular);
if (IsBreedingSeason()) GoNextStage(Stage.Follicular);
return;
}
StayCurrentStage();
}
public override void CopyCycleProperties(HediffComp_Menstruation original)

View file

@ -40,7 +40,7 @@ namespace RJW_Menstruation
}
catch (Exception ex)
{
Log.Error($"Error when trying to emit pheromones from pawn {Pawn}: {ex}");
Log.Error($"Error when trying to emit pheromones: {ex}");
}
}

View file

@ -179,7 +179,7 @@ namespace RJW_Menstruation
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
if (birtherThing < 0) throw new InvalidOperationException("Could not locate index of birtherThing");
if (GeneratePawn?.ReturnType != typeof(Pawn)) throw new InvalidOperationException("GeneratePawn not found");
if (GeneratePawn == null || GeneratePawn.ReturnType != typeof(Pawn)) throw new InvalidOperationException("GeneratePawn not found");
foreach (CodeInstruction instruction in instructions)
{
if (instruction.Calls(GeneratePawn))
@ -233,7 +233,7 @@ namespace RJW_Menstruation
new Type[] {typeof(OutcomeChance), typeof(float), typeof(Precept_Ritual), typeof(List<GeneDef>), typeof(Pawn), typeof(Thing), typeof(Pawn), typeof(Pawn), typeof(LordJob_Ritual), typeof(RitualRoleAssignments)});
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
if (ApplyBirthOutcome?.ReturnType != typeof(Thing)) throw new InvalidOperationException("ApplyBirthOutcome not found");
if (ApplyBirthOutcome == null || ApplyBirthOutcome.ReturnType != typeof(Thing)) throw new InvalidOperationException("ApplyBirthOutcome not found");
foreach (CodeInstruction instruction in instructions)
{
if (instruction.Calls(ApplyBirthOutcome))
@ -283,8 +283,8 @@ namespace RJW_Menstruation
new Type[] { typeof(OutcomeChance), typeof(float), typeof(Precept_Ritual), typeof(List<GeneDef>), typeof(Pawn), typeof(Thing), typeof(Pawn), typeof(Pawn), typeof(LordJob_Ritual), typeof(RitualRoleAssignments) });
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
if (ApplyBirthOutcome?.ReturnType != typeof(Thing)) throw new InvalidOperationException("ApplyBirthOutcome not found");
foreach (CodeInstruction instruction in instructions)
if (ApplyBirthOutcome == null || ApplyBirthOutcome.ReturnType != typeof(Thing)) throw new InvalidOperationException("ApplyBirthOutcome not found");
foreach (var instruction in instructions)
{
if (instruction.Calls(ApplyBirthOutcome))
yield return CodeInstruction.Call(typeof(Ritual_ChildBirth_Apply_Patch), nameof(Ritual_ChildBirth_Apply_Patch.ApplyBirthLoop));

View file

@ -22,7 +22,7 @@ namespace RJW_Menstruation
public static IEnumerable<HediffComp_Menstruation> GetMenstruationComps(this Pawn pawn)
{
List<Hediff> hedifflist = pawn.health.hediffSet.hediffs.FindAll(h => VariousDefOf.AllVaginas.Contains(h.def));
List<Hediff> hedifflist = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll(h => VariousDefOf.AllVaginas.Contains(h.def));
if (hedifflist == null) yield break;
foreach (Hediff hediff in hedifflist)
{
@ -63,7 +63,17 @@ namespace RJW_Menstruation
public static HediffComp_Anus GetAnusComp(this Pawn pawn)
{
return pawn.health.hediffSet.hediffs.FirstOrDefault((Hediff h) => VariousDefOf.AllAnuses.Contains(h.def))?.TryGetComp<HediffComp_Anus>();
List<Hediff> hedifflist = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff h) => h.def.defName.ToLower().Contains("anus"));
HediffComp_Anus result;
if (!hedifflist.NullOrEmpty())
{
foreach (Hediff h in hedifflist)
{
result = h.TryGetComp<HediffComp_Anus>();
if (result != null) return result;
}
}
return null;
}
[Obsolete("This method is obsolete and can cause ambiguity. Use GetMenstruationCompFromVagina or GetMenstruationCompFromPregnancy instead.", true)]
@ -141,7 +151,7 @@ namespace RJW_Menstruation
else if (gestationProgress < 0.8f) icon = fetustex + "04";
else icon = fetustex + "05";
return TryGetTwinsIcon(icon, babycount) ?? ContentFinder<Texture2D>.Get(icon, true);
return TryGetTwinsIcon(icon, babycount) ?? ContentFinder<Texture2D>.Get((icon), true);
}
public static Texture2D TryGetTwinsIcon(string path, int babycount)
@ -160,7 +170,7 @@ namespace RJW_Menstruation
List<Hediff_InsectEgg> insectEggs = new List<Hediff_InsectEgg>();
comp.Pawn.health.hediffSet.GetHediffs(ref insectEggs);
if (insectEggs?.Sum(hediff => hediff.eggssize) > 1.0f) return null; // same logic as "Stuffed" in GetInsectEggedIcon
if (!insectEggs.NullOrEmpty() && insectEggs.Sum(hediff => hediff.eggssize) > 1.0f) return null; // same logic as "Stuffed" in GetInsectEggedIcon
string icon = comp.WombTex;
float cumpercent = comp.TotalCumPercent;
@ -183,7 +193,7 @@ namespace RJW_Menstruation
else if (cumpercent < 0.89f) icon += "_Cum_15";
else if (cumpercent < 0.95f) icon += "_Cum_16";
else icon += "_Cum_17";
Texture2D cumtex = ContentFinder<Texture2D>.Get(icon, true);
Texture2D cumtex = ContentFinder<Texture2D>.Get((icon), true);
return cumtex;
}
public static Texture2D GetInsectEggedIcon(this HediffComp_Menstruation comp)
@ -306,13 +316,15 @@ namespace RJW_Menstruation
}
public static Texture2D GetGenitalIcon(this Pawn pawn, HediffComp_Menstruation comp)
public static Texture2D GetGenitalIcon(this Pawn pawn, HediffComp_Menstruation comp, bool drawOrigin = false)
{
Hediff hediff = comp?.parent;
if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Vagina00", true);
//HediffComp_Menstruation comp = hediff.GetMenstruationComp();
string icon;
float severity = hediff.Severity;
float severity;
if (drawOrigin) severity = comp.OriginVagSize;
else severity = hediff.Severity;
if (comp != null) icon = comp.VagTex;
else icon = "Genitals/Vagina";
@ -329,18 +341,30 @@ namespace RJW_Menstruation
else if (severity < 1.01f) icon += "10"; //cavernous
else icon += "11"; //abyssal
return ContentFinder<Texture2D>.Get(icon, true);
return ContentFinder<Texture2D>.Get((icon), true);
}
public static Texture2D GetAnalIcon(this Pawn pawn)
public static Texture2D GetAnalIcon(this Pawn pawn, bool drawOrigin = false)
{
Hediff hediff = pawn.health.hediffSet.hediffs.FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def)) ??
pawn.health.hediffSet.hediffs.FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Anal00", true);
string icon = ((CompProperties_Anus)hediff.GetAnusComp()?.props)?.analTex ?? "Genitals/Anal";
float severity = hediff.Severity;
Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def)) ??
Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
if (hediff == null) return ContentFinder<Texture2D>.Get(("Genitals/Anal00"), true);
string icon;
float severity;
HediffComp_Anus comp = hediff.GetAnusComp();
if (comp != null)
{
CompProperties_Anus Props = (CompProperties_Anus)comp.props;
icon = Props.analTex ?? "Genitals/Anal";
if (drawOrigin) severity = comp.OriginAnusSize;
else severity = hediff.Severity;
}
else
{
icon = "Genitals/Anal";
severity = hediff.Severity;
}
if (severity < 0.20f) icon += "00"; //micro
else if (severity < 0.40f) icon += "01"; //tight
else if (severity < 0.60f) icon += "02"; //average
@ -348,7 +372,7 @@ namespace RJW_Menstruation
else if (severity < 1.01f) icon += "04"; //cavernous
else icon += "05"; //abyssal
return ContentFinder<Texture2D>.Get(icon, true);
return ContentFinder<Texture2D>.Get((icon), true);
}
public static float GestationHours(this Hediff hediff)
@ -379,18 +403,6 @@ namespace RJW_Menstruation
else return variability;
}
public static bool ShouldCycle(this Pawn pawn)
{
if (!Configurations.EnableAnimalCycle && pawn.IsAnimal()) return false;
if (pawn.GetComp<CompEggLayer>() != null) return false;
if (pawn.RaceHasOviPregnancy()) return false;
if (ModsConfig.BiotechActive && pawn.genes != null &&
pawn.genes.GenesListForReading.Select(gene => gene.def).Intersect(VariousDefOf.EggLayerGenes).Any()) return false;
return true;
}
public static bool IsInEstrus(this Pawn pawn, bool visible = true)
{
if (pawn.Dead) return false;
@ -438,8 +450,8 @@ namespace RJW_Menstruation
}
if (precept != null) return true;
else return pawn.IsBreeder() ||
pawn.HasImpregnationFetish();
else return pawn.HasQuirk(QuirkUtility.Quirks.Breeder) ||
pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish);
}
public static float DamagePants(this Pawn pawn, float fluidAmount)

View file

@ -23,7 +23,7 @@ namespace RJW_Menstruation
{
if (is_discovered ||
!xxx.is_human(pawn) ||
pawn.IsBreeder() || (pawn.Ideo?.HasPrecept(VariousDefOf.Pregnancy_Required) ?? false) ||
pawn.HasQuirk(QuirkUtility.Quirks.Breeder) || (pawn.Ideo?.HasPrecept(VariousDefOf.Pregnancy_Required) ?? false) ||
(pawn.relations?.DirectRelations?.Find(x => x.def.Equals(PawnRelationDefOf.Spouse) ||
x.def.Equals(PawnRelationDefOf.Fiance))) != null)
return;

View file

@ -1,15 +0,0 @@
using Verse;
namespace RJW_Menstruation
{
public class MenstruationModExtension : DefModExtension
{
public float eggLifeTimeFactor = 1.0f;
public bool neverEstrus = false;
public bool alwaysEstrus = false;
public float ovulationFactor = 1.0f;
public bool noBleeding = false;
public bool disableCycle = false;
}
}

View file

@ -155,7 +155,7 @@ namespace RJW_Menstruation
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
if (GetPregnancyHediff?.ReturnType != typeof(Hediff)) throw new InvalidOperationException("GetPregnancyHediff not found");
if (GetPregnancyHediff == null || GetPregnancyHediff.ReturnType != typeof(Hediff)) throw new InvalidOperationException("GetPregnancyHediff not found");
if (Get_Attitude == null || Nullable.GetUnderlyingType(Get_Attitude.ReturnType) != typeof(PregnancyAttitude)) throw new InvalidOperationException("get_Attitude not found");
foreach (CodeInstruction instruction in instructions)
{
@ -192,6 +192,23 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(Pawn_GeneTracker), "AddGene", new Type[] { typeof(Gene), typeof(bool) })]
public class AddGene_Patch
{
public static bool Prefix(ref Gene __result, Gene gene, Pawn ___pawn)
{
if (!VariousDefOf.WombGenes.Contains(gene.def)) return true;
bool keepGene;
if (PawnGenerator.IsBeingGenerated(___pawn))
// During pawn generation, the vagina hediff doesn't exist yet, so use gender to decide instead
// Not the most accurate, but close enough
keepGene = ___pawn.gender == Gender.Female;
else keepGene = ___pawn.GetMenstruationComps().Any();
if (!keepGene) __result = null;
return keepGene;
}
}
[HarmonyPatch(typeof(Pawn_GeneTracker), "Notify_GenesChanged")]
public class Notify_GenesChanged_Patch
{
@ -202,17 +219,6 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(StatPart_FertilityByGenderAge), "AgeFactor")]
public class AgeFactor_Patch
{
public static void Postfix(ref float __result, Pawn pawn)
{
if (__result <= 0.0f) return;
if (pawn.GetMenstruationComps().Any(comp => comp.CalculatingOvulationChance))
__result = 1.0f;
}
}
//[HarmonyPatch(typeof(ChildcareUtility), nameof(ChildcareUtility.SuckleFromLactatingPawn))]
//public class GreedyConsume_Patch
//{

View file

@ -43,8 +43,6 @@ namespace RJW_Menstruation
private static Gizmo CreateGizmo_WombStatus(Pawn pawn, HediffComp_Menstruation comp)
{
if (!comp.loaded)
comp.Initialize();
Texture2D icon, icon_overlay;
StringBuilder description = new StringBuilder();
if (Configurations.Debug)

View file

@ -1,6 +1,5 @@
using HarmonyLib;
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
@ -37,6 +36,10 @@ namespace RJW_Menstruation
if (t.Pawn == pawn && pawn.HasMenstruationComp()) opts.AddDistinct(MakeSelfMenu(pawn, t));
break;
}
}
public static FloatMenuOption MakeSelfMenu(Pawn pawn, LocalTargetInfo target)
@ -50,28 +53,60 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(HealthCardUtility), "DrawOverviewTab")]
public class DrawOverviewTab_Patch
//[HarmonyPatch(typeof(HealthCardUtility), "DrawHediffListing")]
//public class DrawHediffListing_Patch
//{
// public const float buttonWidth = 80f;
// public const float buttonHeight = 20f;
//
// public static void Postfix(Rect rect, Pawn pawn, bool showBloodLoss)
// {
// if (Configurations.EnableButtonInHT && pawn.HasMenstruationComp())
// {
// Rect buttonrect = new Rect(rect.xMax - buttonWidth, rect.yMax - buttonHeight, buttonWidth, buttonHeight);
// if (Widgets.ButtonText(buttonrect, "Status"))
// {
// Dialog_WombStatus.ToggleWindow(pawn,pawn.GetMenstruationComp());
// }
// }
//
//
// }
//}
[HarmonyPatch(typeof(HealthCardUtility), "DrawHediffRow")]
public class DrawHediffRow_Patch
{
public const float buttonWidth = 50f;
public const float buttonHeight = 20f;
public static void Prefix(Rect leftRect, Pawn pawn, float curY)
private static HediffComp_Menstruation GetFirstMenstruation(IEnumerable<Hediff> diffs)
{
if (Configurations.EnableButtonInHT && pawn.ShowStatus() && pawn.ShouldCycle())
foreach (Hediff diff in diffs)
{
HediffComp_Menstruation comp = pawn.GetFirstMenstruationComp();
HediffComp_Menstruation comp = diff.GetMenstruationCompFromVagina();
if (comp != null) return comp;
}
return null;
}
public static void Prefix(Rect rect, Pawn pawn, IEnumerable<Hediff> diffs, ref float curY)
{
if (Configurations.EnableButtonInHT && pawn.ShowStatus())
{
HediffComp_Menstruation comp = GetFirstMenstruation(diffs);
if (comp != null)
{
Text.Font = GameFont.Tiny;
Rect buttonRect = new Rect(leftRect.xMax - buttonWidth - 8f, curY + 4f, buttonWidth, buttonHeight);
if (Widgets.ButtonText(buttonRect, Translations.Button_HealthTab))
Rect buttonrect = new Rect((rect.xMax) / 2 - 5f, curY + 2f, buttonWidth, buttonHeight);
if (Widgets.ButtonText(buttonrect, Translations.Button_HealthTab))
{
Dialog_WombStatus.ToggleWindow(pawn, comp);
}
}
}
}
}
[HarmonyPatch(typeof(CompBiosculpterPod), nameof(CompBiosculpterPod.CannotUseNowPawnCycleReason), new Type[] { typeof(Pawn), typeof(Pawn), typeof(CompBiosculpterPod_Cycle), typeof(bool) })]
@ -85,28 +120,4 @@ namespace RJW_Menstruation
__result = Translations.CannotNoWomb;
}
}
// Doesn't cover everything, but at least it'll get the auto equip
[HarmonyPatch(typeof(Apparel), nameof(Apparel.PawnCanWear))]
public class PawnCanWear_Patch
{
public static void Postfix(ref bool __result, Apparel __instance, Pawn pawn)
{
if (__result && __instance is Absorber)
{
__result = pawn.ShouldCycle() && pawn.GetMenstruationComps().Any();
}
}
}
// Might cause issues when it comes to caravans
//[HarmonyPatch(typeof(JobGiver_OptimizeApparel), nameof(JobGiver_OptimizeApparel.ApparelScoreRaw))]
//public class ApparelScoreRaw_Patch
//{
// public static void Postfix(ref float __result, Pawn pawn, Apparel ap)
// {
// if (__result > 0f && ap is Absorber && !pawn.GetMenstruationComps().Any(comp => comp.TotalCum > 0))
// __result = -10f;
// }
//}
}

View file

@ -24,14 +24,14 @@ namespace RJW_Menstruation
if (sextype != xxx.rjwSextype.Vaginal && sextype != xxx.rjwSextype.DoublePenetration) return true;
if (!partner.ShouldCycle()) return true;
if (partner.IsAnimal() && !Configurations.EnableAnimalCycle) return true;
if (!InteractionCanCausePregnancy(props)) return false;
List<Hediff> pawnparts = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn));
HediffComp_Menstruation comp;
if (pawn.HasImpregnationFetish() || partner.HasImpregnationFetish() || partner.IsInEstrus())
if (pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || partner.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || partner.IsInEstrus())
comp = partner.GetFertileMenstruationComp();
else comp = partner.GetRandomMenstruationComp();
if (comp == null) return true;
@ -100,9 +100,9 @@ namespace RJW_Menstruation
{
public static bool Prefix(Pawn pawn, Pawn partner) // partner has vagina
{
if (!partner.ShouldCycle()) return true;
if (partner.IsAnimal() && !Configurations.EnableAnimalCycle) return true;
HediffComp_Menstruation comp;
if (pawn.HasImpregnationFetish() || partner.HasImpregnationFetish() || partner.IsInEstrus())
if (pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || partner.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || partner.IsInEstrus())
comp = partner.GetFertileMenstruationComp();
else comp = partner.GetRandomMenstruationComp();
if (comp == null)
@ -125,14 +125,14 @@ namespace RJW_Menstruation
{
private static bool PregnancyBlocksImpregnation(this Pawn pawn, bool _)
{
if (!pawn.ShouldCycle()) return pawn.IsPregnant();
if (!Configurations.EnableAnimalCycle && pawn.IsAnimal()) return pawn.IsPregnant();
else if (pawn.GetMenstruationComps().Any()) return false;
else return pawn.IsPregnant();
}
private static readonly MethodInfo IsPregnant = AccessTools.Method(typeof(PawnExtensions), nameof(PawnExtensions.IsPregnant), new System.Type[] { typeof(Pawn), typeof(bool) });
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
if (IsPregnant?.ReturnType != typeof(bool)) throw new System.InvalidOperationException("IsPregnant not found");
if (IsPregnant == null || IsPregnant.ReturnType != typeof(bool)) throw new System.InvalidOperationException("IsPregnant not found");
foreach (CodeInstruction instruction in instructions)
{
if (instruction.Calls(IsPregnant))
@ -179,7 +179,7 @@ namespace RJW_Menstruation
{
// Awkward, but it'll have to do
Pawn pawn = props.pawn;
if (__result == 0 || !pawn.HasImpregnationFetish() || !props.hasPartner()) return;
if (__result == 0 || !pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || !props.hasPartner()) return;
// Check if the existing code would have added the count
Pawn partner = props.partner;
@ -238,7 +238,7 @@ namespace RJW_Menstruation
private static readonly FieldInfo MinimumFuckabilityToHookup = AccessTools.Field(typeof(RJWHookupSettings), nameof(RJWHookupSettings.MinimumFuckabilityToHookup));
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
if (MinimumFuckabilityToHookup?.FieldType != typeof(float)) throw new System.InvalidOperationException("MinimumFuckabilityToHookup not found");
if (MinimumFuckabilityToHookup == null || MinimumFuckabilityToHookup.FieldType != typeof(float)) throw new System.InvalidOperationException("MinimumFuckabilityToHookup not found");
bool first_fuckability = true;
foreach (CodeInstruction instruction in instructions)
{
@ -274,8 +274,8 @@ namespace RJW_Menstruation
private static readonly FieldInfo MinimumRelationshipToHookup = AccessTools.Field(typeof(RJWHookupSettings), nameof(RJWHookupSettings.MinimumRelationshipToHookup));
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
if (MinimumAttractivenessToHookup?.FieldType != typeof(float)) throw new System.InvalidOperationException("MinimumAttractivenessToHookup not found");
if (MinimumRelationshipToHookup?.FieldType != typeof(float)) throw new System.InvalidOperationException("MinimumRelationshipToHookup not found");
if (MinimumAttractivenessToHookup == null || MinimumAttractivenessToHookup.FieldType != typeof(float)) throw new System.InvalidOperationException("MinimumAttractivenessToHookup not found");
if (MinimumRelationshipToHookup == null || MinimumRelationshipToHookup.FieldType != typeof(float)) throw new System.InvalidOperationException("MinimumRelationshipToHookup not found");
LocalBuilder pawn_index = null;
// Like in the last one, we switch the arguments around for the second load
bool first_attractiveness = true;
@ -342,12 +342,10 @@ namespace RJW_Menstruation
{
if (!pawn.IsHashIntervalTick(__instance.ticks_between_thrusts)) return;
xxx.rjwSextype sextype = __instance.Sexprops.sexType;
if (!(target is Pawn partner)) return;
if (!(target is Pawn partner) || pawn == partner) return;
if (sextype != xxx.rjwSextype.Vaginal && sextype != xxx.rjwSextype.DoublePenetration) return;
if (__instance.Sexprops.usedCondom) return;
if (AndroidsCompatibility.IsAndroid(pawn)) return;
if (!Impregnate_Patch.InteractionCanCausePregnancy(__instance.Sexprops)) return;
if (!partner.ShouldCycle()) return;
// Archotech penises have more control. Or something.
CompHediffBodyPart penisComp = pawn.GetGenitalsList()?.Find(genital => (genital as Hediff_PartBaseNatural)?.def.defName.ToLower().Contains("penis") ?? false)?.TryGetComp<CompHediffBodyPart>();
@ -374,14 +372,26 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(PawnCapacityWorker_Fertility), "CalculateAgeImpact")]
public static class PawnCapacityWorker_Fertility_Age_Patch
[HarmonyPatch(typeof(PawnCapacityWorker_Fertility), nameof(PawnCapacityWorker_Fertility.CalculateCapacityLevel))]
public static class PawnCapacityWorker_Fertility_Patch
{
public static void Postfix(ref float __result, Pawn pawn)
private static float GetFertilityStatOrOne(Thing thing, StatDef stat, bool applyPostProcess, int cacheStaleAfterTicks)
{
if (__result <= 0.0f) return;
Pawn pawn = (Pawn)thing;
if (pawn.GetMenstruationComps().Any(comp => comp.CalculatingOvulationChance))
__result = 1.0f;
return 1.0f;
else return thing.GetStatValue(stat, applyPostProcess, cacheStaleAfterTicks);
}
private static readonly MethodInfo GetStatValue = AccessTools.Method(typeof(StatExtension), "GetStatValue", new System.Type[] { typeof(Thing), typeof(StatDef), typeof(bool), typeof(int) });
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
if (GetStatValue == null || GetStatValue.ReturnType != typeof(float)) throw new System.InvalidOperationException("GetStatValue not found");
foreach (CodeInstruction instruction in instructions)
{
if (instruction.Calls(GetStatValue))
yield return CodeInstruction.Call(typeof(PawnCapacityWorker_Fertility_Patch), nameof(GetFertilityStatOrOne));
else yield return instruction;
}
}
}
}

View file

@ -20,8 +20,9 @@ namespace RJW_Menstruation
StringBuilder res = new StringBuilder();
IEnumerable<Pawn> babiesdistinct = babies.Distinct(new RaceComparer());
int iteration = 0;
foreach (Pawn baby in babies.Distinct(new RaceComparer()))
foreach (Pawn baby in babiesdistinct)
{
int num = babies.Where(x => x.def.Equals(baby.def)).Count();
if (iteration > 0) res.Append(", ");
@ -42,8 +43,9 @@ namespace RJW_Menstruation
if (!is_parent_known && Configurations.InfoDetail != Configurations.DetailLevel.All)
return res.Append(Translations.Dialog_FatherUnknown).ToString();
IEnumerable<Pawn> babiesdistinct = babies.Distinct(new FatherComparer(mother));
int iteration = 0;
foreach (Pawn baby in babies.Distinct(new FatherComparer(mother)))
foreach (Pawn baby in babiesdistinct)
{
if (iteration > 0) res.Append(", ");
res.Append(Utility.GetFather(baby, mother)?.LabelShort ?? Translations.Dialog_FatherUnknown);

View file

@ -6,14 +6,14 @@ namespace RJW_Menstruation
public static class QuirkUtility
{
// All quirks used in Menstruation
private enum Quirks
public enum Quirks
{
Breeder,
ImpregnationFetish,
Messy,
Teratophile,
}
private static bool HasQuirk(Pawn pawn, Quirks quirk)
public static bool HasQuirk(this Pawn pawn, Quirks quirk)
{
switch (quirk)
{
@ -29,9 +29,5 @@ namespace RJW_Menstruation
return false;
}
}
public static bool IsBreeder(this Pawn pawn) => HasQuirk(pawn, Quirks.Breeder);
public static bool HasImpregnationFetish(this Pawn pawn) => HasQuirk(pawn, Quirks.ImpregnationFetish);
public static bool IsMessy(this Pawn pawn) => HasQuirk(pawn, Quirks.Messy);
public static bool IsTeratophile(this Pawn pawn) => HasQuirk(pawn, Quirks.Teratophile);
}
}

View file

@ -74,7 +74,6 @@
<Compile Include="HediffComps\MenstruationUtility.cs" />
<Compile Include="Hediff_Estrus.cs" />
<Compile Include="IngestionOutcomeDoers.cs" />
<Compile Include="MenstruationModExtension.cs" />
<Compile Include="Patch\Biotech_Patch.cs" />
<Compile Include="Patch\GC_Patch.cs" />
<Compile Include="Patch\Gizmo_Patch.cs" />

View file

@ -1,7 +1,6 @@
using RimWorld;
using rjw;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using UnityEngine;
using Verse;
@ -187,7 +186,6 @@ namespace RJW_Menstruation
}
public class AbsorberModExtension : DefModExtension
{
public float passiveAbsorptionPerHour = 0.1f;
public bool leakAfterDirty = false;
public bool effectsAfterDirty = false;
public ThingDef dirtyDef = null;
@ -200,7 +198,7 @@ namespace RJW_Menstruation
public float absorbedfluids = 0;
public bool dirty = false;
public int wearTicks = 0;
public virtual float PassiveAbsorptionPerHour => def.GetModExtension<AbsorberModExtension>().passiveAbsorptionPerHour;
protected virtual float PassiveAbsorptionPerHour => 0.1f;
public virtual bool LeakAfterDirty => def.GetModExtension<AbsorberModExtension>().leakAfterDirty;
public virtual bool EffectAfterDirty => def.GetModExtension<AbsorberModExtension>().effectsAfterDirty;
public virtual ThingDef DirtyDef => def.GetModExtension<AbsorberModExtension>().dirtyDef;
@ -213,25 +211,9 @@ namespace RJW_Menstruation
public virtual void WearEffect(int tickInterval)
{
absorbedfluids += PassiveAbsorptionPerHour * tickInterval / GenDate.TicksPerHour;
CheckDirty();
if (dirty) wearTicks += tickInterval;
}
public void CheckDirty()
{
if (absorbedfluids > this.GetStatValue(VariousDefOf.MaxAbsorbable) && !(Wearer?.apparel?.IsLocked(this) ?? false) && DirtyDef != def && DirtyDef != null)
{
bool oldHasStats = !def.equippedStatOffsets.NullOrEmpty();
bool newHasStats = !DirtyDef.equippedStatOffsets.NullOrEmpty();
def = DirtyDef;
dirty = true;
Wearer.outfits?.forcedHandler?.SetForced(this, false);
if (oldHasStats || newHasStats)
Wearer.health.capacities.Notify_CapacityLevelsDirty();
Wearer.apparel.Notify_ApparelChanged();
}
}
public override Color DrawColorTwo => fluidColor;
public override void ExposeData()
@ -249,30 +231,15 @@ namespace RJW_Menstruation
Scribe_Values.Look(ref fluidColor, "fluidColor", Color.white);
}
public override string DescriptionDetailed
{
get
{
StringBuilder text = new StringBuilder(base.DescriptionDetailed);
text.AppendLine();
text.Append(Translations.Description_Absorbed);
text.Append(": ");
text.Append(absorbedfluids.ToStringDecimalIfSmall());
text.Append("/");
text.Append(this.GetStatValue(VariousDefOf.MaxAbsorbable).ToStringDecimalIfSmall());
text.Append("ml");
return text.ToString();
}
}
}
public class Absorber_Tampon : Absorber
{
protected override float PassiveAbsorptionPerHour => 0.5f;
public override void DirtyEffect(int tickInterval)
{
if (wearTicks > MinHrstoDirtyEffect * GenDate.TicksPerHour && Rand.MTBEventOccurs(100.0f, GenDate.TicksPerHour, tickInterval) && !(Wearer.apparel?.IsLocked(this) ?? false))
if (wearTicks > MinHrstoDirtyEffect * GenDate.TicksPerHour && Rand.MTBEventOccurs(100.0f, GenDate.TicksPerHour, tickInterval) && !Wearer.apparel.IsLocked(this))
{
Wearer.health.AddHediff(HediffDefOf.WoundInfection, Genital_Helper.get_genitalsBPR(Wearer));
}

View file

@ -44,7 +44,6 @@ namespace RJW_Menstruation
public static readonly string Dialog_WombInfo08 = "Dialog_WombInfo08".Translate();
public static readonly string Dialog_WombInfo09 = "Dialog_WombInfo09".Translate();
public static readonly string Dialog_WombInfo10 = "Dialog_WombInfo10".Translate();
public static readonly string Description_Absorbed = "Description_Absorbed".Translate();
public static readonly string Option1_Label_1 = "Option1_Label_1".Translate();

View file

@ -388,9 +388,10 @@ namespace RJW_Menstruation
Rect genitalIconRect = new Rect(rect.x, rect.y + fontheight, genitalRectWidth, genitalRectHeight);
Rect genitalVaginaLabelRect = new Rect(rect.x, rect.y + 10f, genitalRectWidth, fontheight);
Rect genitalAnusLabelRect = new Rect(rect.x, rect.y + fontheight + genitalRectHeight, genitalRectWidth, fontheight);
bool showOrigin = Mouse.IsOver(genitalIconRect) && Input.GetMouseButton(0);
vagina = pawn.GetGenitalIcon(comp);
anal = pawn.GetAnalIcon();
vagina = pawn.GetGenitalIcon(comp, showOrigin);
anal = pawn.GetAnalIcon(showOrigin);
GUI.color = new Color(1.00f, 0.47f, 0.47f, 1);
GUI.Box(rect, "", boxstyle);
GUI.color = Utility.SafeSkinColor(pawn);

View file

@ -86,7 +86,7 @@ namespace RJW_Menstruation
{
res = 0.0f;
}
if (pawn.IsMessy()) res *= Rand.Range(4.0f, 8.0f);
if (pawn.HasQuirk(QuirkUtility.Quirks.Messy)) res *= Rand.Range(4.0f, 8.0f);
return res;
}
@ -95,7 +95,16 @@ namespace RJW_Menstruation
public static HediffComp_Breast GetBreastComp(this Pawn pawn)
{
return pawn.health.hediffSet.hediffs.FirstOrDefault((Hediff h) => VariousDefOf.AllBreasts.Contains(h.def))?.TryGetComp<HediffComp_Breast>();
List<Hediff> hedifflist = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_breastsBPR(pawn))?.FindAll(h => VariousDefOf.AllBreasts.Contains(h.def));
if (hedifflist.NullOrEmpty()) hedifflist = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_uddersBPR(pawn))?.FindAll(h => VariousDefOf.AllBreasts.Contains(h.def));
if (hedifflist.NullOrEmpty()) return null;
HediffComp_Breast result;
foreach (Hediff h in hedifflist)
{
result = h.TryGetComp<HediffComp_Breast>();
if (result != null) return result;
}
return null;
}
public static HediffComp_Breast GetBreastComp(this Hediff hediff)
@ -183,7 +192,8 @@ namespace RJW_Menstruation
public static void DrawBreastIcon(this Pawn pawn, Rect rect)
{
Hediff hediff = pawn.health.hediffSet.hediffs.FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_breastsBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def)) ??
Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_uddersBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
Texture2D breast, nipple, areola;
if (hediff != null)
{
@ -341,19 +351,20 @@ namespace RJW_Menstruation
public static string GetVaginaLabel(this Pawn pawn)
{
Hediff hediff = pawn.health.hediffSet.hediffs.Find(h => VariousDefOf.AllVaginas.Contains(h.def));
Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn)).Find(h => VariousDefOf.AllVaginas.Contains(h.def));
return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")" + "\n" + xxx.CountOfSex.LabelCap.CapitalizeFirst() + ": " + pawn.records.GetAsInt(xxx.CountOfSex);
}
public static string GetAnusLabel(this Pawn pawn)
{
Hediff hediff = pawn.health.hediffSet.hediffs.FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def)) ??
Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def)) ??
Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
if (hediff != null) return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")";
else return "";
}
public static string GetBreastLabel(this Pawn pawn)
{
Hediff hediff = pawn.health.hediffSet.hediffs.FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_breastsBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def)) ??
Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_uddersBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
if (hediff != null) return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")";
else return "";
}
@ -405,7 +416,7 @@ namespace RJW_Menstruation
{
Pawn res = pawn.GetFather();
if (res != null) return res;
else res = pawn.relations?.GetFirstDirectRelationPawn(PawnRelationDefOf.Parent, x => x != mother);
else res = pawn.relations?.GetFirstDirectRelationPawn(PawnRelationDefOf.Parent, x => x != mother) ?? null;
return res;
}
@ -437,7 +448,7 @@ namespace RJW_Menstruation
{
if (!Configurations.EnableWombIcon) return false;
if (pawn.Drafted && !Configurations.EnableDraftedIcon) return false;
if (!pawn.ShouldCycle()) return false;
if (pawn.IsAnimal() && !Configurations.EnableAnimalCycle) return false;
return true;
}

View file

@ -40,26 +40,44 @@ namespace RJW_Menstruation
public static readonly ThoughtDef TookContraceptivePill = DefDatabase<ThoughtDef>.GetNamed("TookContraceptivePill");
public static readonly ThoughtDef HateTookContraceptivePill = DefDatabase<ThoughtDef>.GetNamed("HateTookContraceptivePill");
public static readonly ThoughtDef EggRestorationReceived = DefDatabase<ThoughtDef>.GetNamed("EggRestorationReceived");
public static readonly CompProperties_Menstruation HumanVaginaCompProperties = Genital_Helper.average_vagina.CompProps<CompProperties_Menstruation>();
public static readonly CompProperties_Menstruation HumanVaginaCompProperties = (CompProperties_Menstruation)Genital_Helper.average_vagina.comps.FirstOrDefault(x => x is CompProperties_Menstruation);
public static readonly KeyBindingDef OpenStatusWindowKey = DefDatabase<KeyBindingDef>.GetNamed("OpenStatusWindow");
public static readonly RecordDef AmountofCreampied = DefDatabase<RecordDef>.GetNamed("AmountofCreampied");
public static readonly RecordDef AmountofFertilizedEggs = DefDatabase<RecordDef>.GetNamed("AmountofFertilizedEggs");
public static readonly TaleDef TaleCameInside = DefDatabase<TaleDef>.GetNamed("CameInside");
public static readonly GeneDef ShortEggLifetime = DefDatabase<GeneDef>.GetNamed("Menstruation_ShortEggLifetime");
public static readonly GeneDef DoubleEggLifetime = DefDatabase<GeneDef>.GetNamed("Menstruation_DoubleEggLifetime");
public static readonly GeneDef QuadEggLifetime = DefDatabase<GeneDef>.GetNamed("Menstruation_QuadEggLifetime");
public static readonly GeneDef NeverEstrus = DefDatabase<GeneDef>.GetNamed("Menstruation_NeverEstrus");
public static readonly GeneDef FullEstrus = DefDatabase<GeneDef>.GetNamed("Menstruation_FullEstrus");
public static readonly GeneDef DoubleOvulation = DefDatabase<GeneDef>.GetNamed("Menstruation_DoubleOvulation");
public static readonly GeneDef QuadOvulation = DefDatabase<GeneDef>.GetNamed("Menstruation_QuadOvulation");
public static readonly GeneDef NoBleeding = DefDatabase<GeneDef>.GetNamed("Menstruation_NoBleeding");
public static readonly HashSet<GeneDef> WombGenes = new HashSet<GeneDef>() {
ShortEggLifetime,
DoubleEggLifetime,
QuadEggLifetime,
NeverEstrus,
FullEstrus,
DoubleOvulation,
QuadOvulation,
NoBleeding };
private static List<ThingDef> allraces = null;
private static List<PawnKindDef> allkinds = null;
private static HashSet<HediffDef> allvaginas = null;
private static HashSet<HediffDef> allanuses = null;
private static HashSet<HediffDef> allbreasts = null;
private static HashSet<GeneDef> egglayergenes = null;
public static List<ThingDef> AllRaces
{
get
{
if (allraces != null) return allraces;
allraces = DefDatabase<ThingDef>.AllDefsListForReading.Where(thingdef => thingdef.race?.IsFlesh ?? false).ToList();
List<ThingDef> allThings = DefDatabase<ThingDef>.AllDefsListForReading;
allraces = allThings.FindAll(x => x.race != null && x.race.IsFlesh);
return allraces;
}
}
@ -68,8 +86,9 @@ namespace RJW_Menstruation
get
{
if (allkinds != null) return allkinds;
allkinds = DefDatabase<PawnKindDef>.AllDefsListForReading.Where(pawnkinddef => pawnkinddef.race != null).ToList();
List<PawnKindDef> allKinds = DefDatabase<PawnKindDef>.AllDefsListForReading;
allkinds = allKinds.FindAll(x => x.race != null);
return allkinds;
}
}
@ -142,16 +161,6 @@ namespace RJW_Menstruation
return allbreasts;
}
}
public static HashSet<GeneDef> EggLayerGenes
{
get
{
if (egglayergenes != null) return egglayergenes;
egglayergenes = DefDatabase<GeneDef>.AllDefsListForReading.Where(geneDef => geneDef.GetModExtension<MenstruationModExtension>()?.disableCycle ?? false).ToHashSet();
return egglayergenes;
}
}
// Defs from Milkable Colonists
public static readonly HediffDef Hediff_Lactating_Drug = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Drug");

View file

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
<packageId>rjw.menstruation</packageId>
<name>RJW Menstruation Cycle</name>
<author>lutepickle</author>
<url>https://gitgud.io/lutepickle/rjw_menstruation/</url>
<supportedVersions>
<li>1.2</li>
<li>1.3</li>
@ -30,17 +28,13 @@
<li>Abraxas.RJW.RaceSupport</li>
<li>rjw.milk.humanoid</li>
</loadAfter>
<incompatibleWithByVersion>
<v1.4>
<li>conit.thebirdsandthebees</li> <!--Breaks fertility calculations-->
</v1.4>
</incompatibleWithByVersion>
<packageId>rjw.menstruation</packageId>
<description>Adds menstruation mechanics to vaginas:
Wombs cycle between follicular, luteal, and bleeding phases
Tracks eggs ovulated and cum in wombs to determine pregnancy
Womb icon and status window
Estrus and pheromone effects
Estrus effects
Race-specific fetus images for many vanilla animals
Pregnancies from multiple eggs and different fathers
Identical siblings

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>RJW Menstruation</identifier>
<version>1.0.9.4</version>
<version>1.0.9.1</version>
<dependencies>
</dependencies>
<incompatibleWith />

View file

@ -14,5 +14,6 @@
<v1.4>
<li>1.4</li>
<li IfModActive="ASMR.RJW.RaceSupport">1.4/RJW Menstruation Race Support</li>
<!-- <li IfModActive="rjw.milk.humanoid">1.3/MilkModule</li> -->
</v1.4>
</loadFolders>

View file

@ -1,36 +1,8 @@
Version 1.0.9.4
- Pawns with the egglaying genes from Erin's Corvyia and Outland - Genetics no longer have a menstrual cycle.
Version 1.0.9.3
- The biosculptor egg restoration cycle will now give more eggs to races that ovulate more than one egg at a time.
- All pawns can now use all menstruation genes, regardless of gender or having a womb.
- Egglaying animals no longer have a menstrual cycle.
- Fix bug preventing absorbers from becoming dirty.
Version 1.0.9.2
- Updated Traditional Chinese translation by Hydrogen.
- Fixed the no bleeding gene having positive metabolic efficiency instead of negative.
- Fixed ovulation chance not accounting for genes or precepts.
- Better handle wombs that are not in the genitals body part.
- Handle errors more gracefully when starting a pregnancy.
- Fix implanting multiple eggs in an animal when configured to use Biotech pregnancies.
- An equipped tampon or pad will now show how much fluid it has absorbed in its tooltip.
- Passive absorption will now make a tampon or pad dirty after enough time, even if no fluid was added.
- It will take a cloth tampon about 2 days to become dirty passively. A cloth pad will take about 10 days.
- An absorber that was force worn will no longer be forced once it becomes dirty.
- Pawns without a menstrual cycle will no longer equip absorbers.
- Egglaying races no longer have a menstrual cycle, regardless of vagina type.
- Pawns with the egglaying genes from Alpha Genes, VE Saurids, or Phytokin no longer have a menstrual cycle.
- The womb status button will now appear in a pawn's health tab when using Compact Hediffs, with thanks to Fern.
- Tampons and pads are now allowed by default in the worker, soldier, and slave starting outfits.
Version 1.0.9.1
- Japanese translation for most text by Lokuzt.
- New womb, cum, and fetus graphics by Euldrop.
- Add new ideology-related thoughts with the sexperience-ideology mod.
- New pheromone system: Pawns in visible estrus will increase the sex drive of nearby males. Can be disabled in the options.
- Using the egg restoration biosculptor cycle will give a small mood buff.
- Fix some errors related to precum.
- Periodic ovulators that don't bleed will properly enter anestrus after their luteal stage.
- Climacteric/menopausal pawns will have their sex need slow properly when the womb's tick rate is non-default.