mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	1.0.3.1
This commit is contained in:
		
							parent
							
								
									51cbc68c91
								
							
						
					
					
						commit
						2d43ff1717
					
				
					 13 changed files with 222 additions and 84 deletions
				
			
		| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
			
		||||
<Manifest>
 | 
			
		||||
	<identifier>RJW Menstruation</identifier>
 | 
			
		||||
	<version>1.0.3.0</version>
 | 
			
		||||
	<version>1.0.3.1</version>
 | 
			
		||||
	<dependencies>
 | 
			
		||||
	</dependencies>
 | 
			
		||||
	<incompatibleWith />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -145,8 +145,49 @@
 | 
			
		|||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="SlimeVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_InducedOvulator">
 | 
			
		||||
					<maxCumCapacity>5</maxCumCapacity>
 | 
			
		||||
					<baseImplantationChanceFactor>2.0</baseImplantationChanceFactor>
 | 
			
		||||
					<basefertilizationChanceFactor>2.0</basefertilizationChanceFactor>
 | 
			
		||||
					<deviationFactor>0.05</deviationFactor>
 | 
			
		||||
					<folicularIntervalDays>12</folicularIntervalDays>
 | 
			
		||||
					<lutealIntervalDays>9</lutealIntervalDays>
 | 
			
		||||
					<bleedingIntervalDays>0</bleedingIntervalDays>
 | 
			
		||||
					<recoveryIntervalDays>3</recoveryIntervalDays>
 | 
			
		||||
					<eggLifespanDays>1</eggLifespanDays>
 | 
			
		||||
					<wombTex>Womb/Womb</wombTex>
 | 
			
		||||
					<vagTex>Genitals/Vagina</vagTex>
 | 
			
		||||
					<estrusDaysBeforeOvulation>6</estrusDaysBeforeOvulation>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="DemonVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_InducedOvulator">
 | 
			
		||||
					<maxCumCapacity>10</maxCumCapacity>
 | 
			
		||||
					<baseImplantationChanceFactor>2.0</baseImplantationChanceFactor>
 | 
			
		||||
					<basefertilizationChanceFactor>2.0</basefertilizationChanceFactor>
 | 
			
		||||
					<deviationFactor>0.05</deviationFactor>
 | 
			
		||||
					<folicularIntervalDays>14</folicularIntervalDays>
 | 
			
		||||
					<lutealIntervalDays>14</lutealIntervalDays>
 | 
			
		||||
					<bleedingIntervalDays>0</bleedingIntervalDays>
 | 
			
		||||
					<recoveryIntervalDays>3</recoveryIntervalDays>
 | 
			
		||||
					<eggLifespanDays>1</eggLifespanDays>
 | 
			
		||||
					<wombTex>Womb/Womb</wombTex>
 | 
			
		||||
					<vagTex>Genitals/Vagina</vagTex>
 | 
			
		||||
					<estrusDaysBeforeOvulation>6</estrusDaysBeforeOvulation>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
</Patch>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,11 +1,5 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<!-- one cycle = folicularIntervalDays + lutealIntervalDays -->
 | 
			
		||||
<!-- folicularIntervalDays includes bleedingIntervalDays.  -->
 | 
			
		||||
<!-- bleedingIntervalDays must be smaller than folicularIntervalDays  -->
 | 
			
		||||
<!-- unit of maxCumCapacity is ml -->
 | 
			
		||||
<!-- actual max cum capacity is 500times of maxCumCapacity -->
 | 
			
		||||
<!-- one egg = 1 ovaryPower-->
 | 
			
		||||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
| 
						 | 
				
			
			@ -20,4 +14,16 @@
 | 
			
		|||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="SlimeBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
					<BreastTex>Breasts/Breast</BreastTex>
 | 
			
		||||
					<BlacknippleColor>(55,20,0)</BlacknippleColor>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
</Patch>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,92 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<Patch>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="BigRaceBreats"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
					<BreastTex>Breasts/Breast</BreastTex>
 | 
			
		||||
					<BlacknippleColor>(55,20,0)</BlacknippleColor>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="OrcBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
					<BreastTex>Breasts/Breast</BreastTex>
 | 
			
		||||
					<BlacknippleColor>(55,20,0)</BlacknippleColor>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="GhoulBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
					<BreastTex>Breasts/Breast</BreastTex>
 | 
			
		||||
					<BlacknippleColor>(55,20,0)</BlacknippleColor>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="GhostBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
					<BreastTex>Breasts/Breast</BreastTex>
 | 
			
		||||
					<BlacknippleColor>(55,20,0)</BlacknippleColor>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="NecroBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
					<BreastTex>Breasts/Breast</BreastTex>
 | 
			
		||||
					<BlacknippleColor>(55,20,0)</BlacknippleColor>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="NephilaBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
					<BreastTex>Breasts/Breast</BreastTex>
 | 
			
		||||
					<BlacknippleColor>(55,20,0)</BlacknippleColor>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="NephilaSlimeBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
					<BreastTex>Breasts/Breast</BreastTex>
 | 
			
		||||
					<BlacknippleColor>(55,20,0)</BlacknippleColor>
 | 
			
		||||
				</li>
 | 
			
		||||
			</comps>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
</Patch>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,3 +1,9 @@
 | 
			
		|||
Version 1.0.3.1
 | 
			
		||||
 - fixed problems that pawns get climacteric stage after pregnancy even the menopause setting is off
 | 
			
		||||
 - now implantation chance is independent with rjw pregnancy settings
 | 
			
		||||
 - fixed broken vagina support
 | 
			
		||||
 - breasts support for race support
 | 
			
		||||
 | 
			
		||||
Version 1.0.3.0
 | 
			
		||||
 - added various fetus images (thanks to GluxDesigns)
 | 
			
		||||
 - added twin fetus image
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,7 +46,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                float width = 450f + 2 * windowMargin;
 | 
			
		||||
                float height = 820f;
 | 
			
		||||
                if (!Configurations.DrawWombStatus) height -= wombRectHeight;
 | 
			
		||||
                if (!Configurations.DrawVaginaStatus) width -= 150f;
 | 
			
		||||
                if (!Configurations.DrawVaginaStatus || pawn.IsAnimal()) width -= 150f;
 | 
			
		||||
                return new Vector2(width, height);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -59,6 +59,9 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        public void ChangePawn(Pawn pawn, HediffComp_Menstruation comp)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            if (this.pawn.IsAnimal() && !pawn.IsAnimal()) windowRect.width += 150f;
 | 
			
		||||
            else if (!this.pawn.IsAnimal() && pawn.IsAnimal()) windowRect.width -= 150f;
 | 
			
		||||
            this.pawn = pawn;
 | 
			
		||||
            this.comp = comp;
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,6 +12,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                || comp.curStage.Equals(HediffComp_Menstruation.Stage.Luteal)
 | 
			
		||||
                || comp.curStage.Equals(HediffComp_Menstruation.Stage.ClimactericFollicular)
 | 
			
		||||
                || comp.curStage.Equals(HediffComp_Menstruation.Stage.ClimactericLuteal)
 | 
			
		||||
                || comp.curStage.Equals(HediffComp_Menstruation.Stage.Anestrus)
 | 
			
		||||
                ))
 | 
			
		||||
            {
 | 
			
		||||
                comp.SetEstrus(comp.Props.eggLifespanDays);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -203,8 +203,8 @@ namespace RJW_Menstruation
 | 
			
		|||
            {
 | 
			
		||||
                float factor = 1.0f;
 | 
			
		||||
                if (parent.pawn.Has(Quirk.Breeder)) factor = 10.0f;
 | 
			
		||||
                if (xxx.is_animal(parent.pawn)) factor *= RJWPregnancySettings.animal_impregnation_chance / 100f;
 | 
			
		||||
                else factor *= RJWPregnancySettings.humanlike_impregnation_chance / 100f;
 | 
			
		||||
                //if (xxx.is_animal(parent.pawn)) factor *= RJWPregnancySettings.animal_impregnation_chance / 100f;
 | 
			
		||||
                //else factor *= RJWPregnancySettings.humanlike_impregnation_chance / 100f;
 | 
			
		||||
                return parent.pawn.health.capacities.GetLevel(xxx.reproduction) * factor;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -640,7 +640,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AfterNotCumIn()
 | 
			
		||||
        public virtual void AfterNotCumIn()
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -649,61 +649,12 @@ namespace RJW_Menstruation
 | 
			
		|||
        /// Action for both Cum and NotCum
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="fd">Fluid deviation</param>
 | 
			
		||||
        public void AfterFluidIn(float fd)
 | 
			
		||||
        public virtual void AfterFluidIn(float fd)
 | 
			
		||||
        {
 | 
			
		||||
            //ModLog.Message("LLActivated: " + Configurations.LLActivated);
 | 
			
		||||
            //if (Configurations.LLActivated)
 | 
			
		||||
            //{
 | 
			
		||||
            //    LLCumflationIn(fd);
 | 
			
		||||
            //}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Cumflation for Licentia Labs
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="fd"></param>
 | 
			
		||||
        public void LLCumflationIn(float fd)
 | 
			
		||||
        {
 | 
			
		||||
            if (TotalCumPercent > 1.0f)
 | 
			
		||||
            {
 | 
			
		||||
                ModLog.Message("cumflation in");
 | 
			
		||||
                BodyPartRecord genital = Genital_Helper.get_genitalsBPR(parent.pawn);
 | 
			
		||||
                HediffWithComps hediff = parent.pawn.health?.hediffSet?.GetHediffs<HediffWithComps>()?.FirstOrDefault(x => x.def == VariousDefOf.Cumflation && x.Part.Equals(genital));
 | 
			
		||||
 | 
			
		||||
                if (hediff == null) // 1.0 fd = 0.002 severity
 | 
			
		||||
                {
 | 
			
		||||
                    ModLog.Message("hediff null");
 | 
			
		||||
                    hediff = (HediffWithComps)HediffMaker.MakeHediff(VariousDefOf.Cumflation, parent.pawn);
 | 
			
		||||
                    hediff.Severity = (TotalCumPercent - 1.0f) * 0.002f;
 | 
			
		||||
                    parent.pawn.health.AddHediff(hediff, genital);
 | 
			
		||||
                    ModLog.Message("added hediff");
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    ModLog.Message("increase severity: " + hediff.Part.Label);
 | 
			
		||||
                    hediff.Severity += fd * 0.002f;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void LLCumflationOut(float fd)
 | 
			
		||||
        {
 | 
			
		||||
            HediffWithComps hediff = parent.pawn.health?.hediffSet?.GetHediffs<HediffWithComps>()?.FirstOrDefault(x => x.def == VariousDefOf.Cumflation && x.Part.def.Equals(xxx.genitalsDef));
 | 
			
		||||
            if (hediff != null)
 | 
			
		||||
            {
 | 
			
		||||
                if (TotalCumPercent < 1.0f) parent.pawn.health.RemoveHediff(hediff);
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    ModLog.Message("decrease severity: " + hediff?.Part?.Label + TotalCumPercent * 0.002f);
 | 
			
		||||
                    hediff.Severity -= fd * 0.002f;
 | 
			
		||||
                    if (hediff.Severity < TotalCumPercent * 0.002f) hediff.Severity = TotalCumPercent * 0.002f;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public void BeforeCumOut(out Absorber absorber)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -718,7 +669,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        /// <summary>
 | 
			
		||||
        /// For natural leaking
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public void AfterCumOut()
 | 
			
		||||
        public virtual void AfterCumOut()
 | 
			
		||||
        {
 | 
			
		||||
            parent.pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.LeakingFluids);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -727,12 +678,9 @@ namespace RJW_Menstruation
 | 
			
		|||
        /// For all type of leaking
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="fd"></param>
 | 
			
		||||
        public void AfterFluidOut(float fd)
 | 
			
		||||
        public virtual void AfterFluidOut(float fd)
 | 
			
		||||
        {
 | 
			
		||||
            //if (Configurations.LLActivated)
 | 
			
		||||
            //{
 | 
			
		||||
            //    LLCumflationOut(fd);
 | 
			
		||||
            //}
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -905,14 +853,7 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
                if (!Configurations.EnableMenopause)
 | 
			
		||||
                {
 | 
			
		||||
                    Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Climacteric);
 | 
			
		||||
                    if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
 | 
			
		||||
                    hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Menopause);
 | 
			
		||||
                    if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
 | 
			
		||||
                    if (curStage == Stage.ClimactericBleeding) curStage = Stage.Bleeding;
 | 
			
		||||
                    else if (curStage == Stage.ClimactericFollicular) curStage = Stage.Follicular;
 | 
			
		||||
                    else if (curStage == Stage.ClimactericLuteal) curStage = Stage.Luteal;
 | 
			
		||||
 | 
			
		||||
                    RemoveClimactericEffect();
 | 
			
		||||
                }
 | 
			
		||||
                else if (ovarypower < -50000)
 | 
			
		||||
                {
 | 
			
		||||
| 
						 | 
				
			
			@ -1413,7 +1354,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                    {
 | 
			
		||||
                        if (curStageHrs >= recoveryIntervalhours)
 | 
			
		||||
                        {
 | 
			
		||||
                            if (ovarypower < ovarypowerthreshold)
 | 
			
		||||
                            if (Configurations.EnableMenopause && ovarypower < ovarypowerthreshold)
 | 
			
		||||
                            {
 | 
			
		||||
                                GoNextStage(Stage.ClimactericFollicular);
 | 
			
		||||
                            }
 | 
			
		||||
| 
						 | 
				
			
			@ -1446,7 +1387,12 @@ namespace RJW_Menstruation
 | 
			
		|||
                case Stage.ClimactericFollicular:
 | 
			
		||||
                    action = delegate
 | 
			
		||||
                    {
 | 
			
		||||
                        if (curStageHrs >= (follicularIntervalhours - bleedingIntervalhours) * CycleFactor)
 | 
			
		||||
                        if (!Configurations.EnableMenopause)
 | 
			
		||||
                        {
 | 
			
		||||
                            RemoveClimactericEffect();
 | 
			
		||||
                            StayCurrentStage();
 | 
			
		||||
                        }
 | 
			
		||||
                        else if (curStageHrs >= (follicularIntervalhours - bleedingIntervalhours) * CycleFactor)
 | 
			
		||||
                        {
 | 
			
		||||
                            GoNextStage(Stage.Ovulatory);
 | 
			
		||||
                        }
 | 
			
		||||
| 
						 | 
				
			
			@ -1465,7 +1411,12 @@ namespace RJW_Menstruation
 | 
			
		|||
                case Stage.ClimactericLuteal:
 | 
			
		||||
                    action = delegate
 | 
			
		||||
                    {
 | 
			
		||||
                        if (!eggs.NullOrEmpty())
 | 
			
		||||
                        if (!Configurations.EnableMenopause)
 | 
			
		||||
                        {
 | 
			
		||||
                            RemoveClimactericEffect();
 | 
			
		||||
                            StayCurrentStage();
 | 
			
		||||
                        }
 | 
			
		||||
                        else if (!eggs.NullOrEmpty())
 | 
			
		||||
                        {
 | 
			
		||||
                            FertilizationCheck();
 | 
			
		||||
                            EggDecay();
 | 
			
		||||
| 
						 | 
				
			
			@ -1509,7 +1460,12 @@ namespace RJW_Menstruation
 | 
			
		|||
                case Stage.ClimactericBleeding:
 | 
			
		||||
                    action = delegate
 | 
			
		||||
                    {
 | 
			
		||||
                        if (curStageHrs >= bleedingIntervalhours)
 | 
			
		||||
                        if (!Configurations.EnableMenopause)
 | 
			
		||||
                        {
 | 
			
		||||
                            RemoveClimactericEffect();
 | 
			
		||||
                            StayCurrentStage();
 | 
			
		||||
                        }
 | 
			
		||||
                        else if (curStageHrs >= bleedingIntervalhours)
 | 
			
		||||
                        {
 | 
			
		||||
                            follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor * 6);
 | 
			
		||||
                            GoNextStage(Stage.ClimactericFollicular);
 | 
			
		||||
| 
						 | 
				
			
			@ -1588,6 +1544,16 @@ namespace RJW_Menstruation
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected void RemoveClimactericEffect()
 | 
			
		||||
        {
 | 
			
		||||
            Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Climacteric);
 | 
			
		||||
            if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
 | 
			
		||||
            hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Menopause);
 | 
			
		||||
            if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
 | 
			
		||||
            if (curStage == Stage.ClimactericBleeding) curStage = Stage.Bleeding;
 | 
			
		||||
            else if (curStage == Stage.ClimactericFollicular) curStage = Stage.Follicular;
 | 
			
		||||
            else if (curStage == Stage.ClimactericLuteal) curStage = Stage.Luteal;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected int PeriodRandomizer(int intervalhours, float deviation)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,6 +5,7 @@ using System.Collections.Generic;
 | 
			
		|||
using System.Linq;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using Verse;
 | 
			
		||||
using rjw;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Menstruation
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -110,6 +111,31 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    [HarmonyPatch(typeof(PawnColumnWorker_Pregnant), "GetIconFor")]
 | 
			
		||||
    public class PawnColumnWorker_Patch_Icon
 | 
			
		||||
    {
 | 
			
		||||
        public static void Postfix(Pawn pawn, ref Texture2D __result)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn.IsPregnant()) __result = ContentFinder<Texture2D>.Get("UI/Icons/Animal/Pregnant", true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    [HarmonyPatch(typeof(PawnColumnWorker_Pregnant), "GetTooltipText")]
 | 
			
		||||
    public class PawnColumnWorker_Patch_Tooltip
 | 
			
		||||
    {
 | 
			
		||||
        public static bool Prefix(Pawn pawn, ref string __result)
 | 
			
		||||
        {
 | 
			
		||||
            float gestationProgress = PregnancyHelper.GetPregnancy(pawn).Severity;
 | 
			
		||||
            int num = (int)(pawn.RaceProps.gestationPeriodDays * 60000f);
 | 
			
		||||
            int numTicks = (int)(gestationProgress * (float)num);
 | 
			
		||||
            __result = "PregnantIconDesc".Translate(numTicks.ToStringTicksToDays("F0"), num.ToStringTicksToDays("F0"));
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    //[HarmonyPatch(typeof(JobGiver_OptimizeApparel), "ApparelScoreGain_NewTmp")]
 | 
			
		||||
    //public class OptimizeApparel_Patch
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,10 +46,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        public static readonly JobDef Job_LactateSelf = DefDatabase<JobDef>.GetNamed("LactateSelf");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        // Defs from Licentia Labs
 | 
			
		||||
        public static readonly HediffDef Cumflation = DefDatabase<HediffDef>.GetNamedSilentFail("Cumflation");
 | 
			
		||||
        public static readonly ThoughtDef GotOverCumflated = DefDatabase<ThoughtDef>.GetNamedSilentFail("GotOverCumflated");
 | 
			
		||||
        public static readonly ThoughtDef GotOverCumflatedEnjoyed = DefDatabase<ThoughtDef>.GetNamedSilentFail("GotOverCumflatedEnjoyed");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue