mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Merge branch 'dev'
This commit is contained in:
		
						commit
						c03aede9f4
					
				
					 23 changed files with 225 additions and 219 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Defs>
 | 
			
		||||
	<TaleDef>
 | 
			
		||||
		<defName>CameInside</defName>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,14 +2,14 @@
 | 
			
		|||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="RJW_FertPill"]/ingestible/outcomeDoers</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="RJW_FertPill"]/ingestible/outcomeDoers</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.FertPillOutcomeDoer"/>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="RJW_Contraceptive"]/ingestible/outcomeDoers</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="RJW_Contraceptive"]/ingestible/outcomeDoers</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.ContraceptiveOutcomeDoer"/>
 | 
			
		||||
		</value>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,7 @@
 | 
			
		|||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="Vagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="Vagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -31,7 +31,7 @@
 | 
			
		|||
	
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="GenericVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="GenericVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -51,7 +51,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="HydraulicVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="HydraulicVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -65,7 +65,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="BionicVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="BionicVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -79,7 +79,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="ArchotechVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="ArchotechVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -100,7 +100,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="Anus"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="Anus"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Anus">
 | 
			
		||||
| 
						 | 
				
			
			@ -111,7 +111,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="HydraulicAnus"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="HydraulicAnus"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Anus">
 | 
			
		||||
| 
						 | 
				
			
			@ -122,7 +122,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="BionicAnus"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="BionicAnus"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Anus">
 | 
			
		||||
| 
						 | 
				
			
			@ -133,7 +133,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="ArchotechAnus"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="ArchotechAnus"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Anus">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="DogVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="DogVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -32,7 +32,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="CatVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="CatVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_InducedOvulator">
 | 
			
		||||
| 
						 | 
				
			
			@ -54,7 +54,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="HorseVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="HorseVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -77,7 +77,7 @@
 | 
			
		|||
	
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="DragonVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="DragonVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -98,7 +98,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="NarrowVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="NarrowVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -119,7 +119,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="RodentVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="RodentVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_InducedOvulator">
 | 
			
		||||
| 
						 | 
				
			
			@ -140,7 +140,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="SlimeVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="SlimeVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_InducedOvulator">
 | 
			
		||||
| 
						 | 
				
			
			@ -161,7 +161,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="DemonVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="DemonVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_InducedOvulator">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="Breasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="Breasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -15,7 +15,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="HydraulicBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="HydraulicBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -27,7 +27,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="BionicBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="BionicBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -39,7 +39,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="ArchotechBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="ArchotechBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -51,7 +51,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="SlimeBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="SlimeBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,35 +2,35 @@
 | 
			
		|||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Cloth"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Cloth"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<MaxAbsorbable>1.0</MaxAbsorbable>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Synthread"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Synthread"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<MaxAbsorbable>2.0</MaxAbsorbable>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="DevilstrandCloth"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="DevilstrandCloth"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<MaxAbsorbable>0.5</MaxAbsorbable>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Hyperweave"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Hyperweave"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<MaxAbsorbable>0.25</MaxAbsorbable>
 | 
			
		||||
		</value>
 | 
			
		||||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/ThingDef[@Name="WoolBase"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[@Name="WoolBase"]/stuffProps/statFactors</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<MaxAbsorbable>1.5</MaxAbsorbable>
 | 
			
		||||
		</value>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,7 +34,7 @@
 | 
			
		|||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Human"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Human"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,7 @@
 | 
			
		|||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[@Name="BigBirdThingBase"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[@Name="BigBirdThingBase"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Birds/Fetus_Bird</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -40,7 +40,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Chicken"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Chicken"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Birds/Fetus_Bird</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -53,7 +53,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Duck"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Duck"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Birds/Fetus_Bird</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -66,7 +66,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Goose"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Goose"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Birds/Fetus_Bird</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -79,7 +79,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="YorkshireTerrier"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="YorkshireTerrier"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Canines/Fetus_Dog</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -93,7 +93,7 @@
 | 
			
		|||
	
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Husky"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Husky"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Canines/Fetus_Dog</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -106,7 +106,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="LabradorRetriever"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="LabradorRetriever"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Canines/Fetus_Dog</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -119,7 +119,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="YorkshireTerrier"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="YorkshireTerrier"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Canines/Fetus_Dog</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -133,7 +133,7 @@
 | 
			
		|||
	
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Warg"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Warg"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Canines/Fetus_Dog</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -146,7 +146,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[@Name="ThingBaseWolf"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[@Name="ThingBaseWolf"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Canines/Fetus_Dog</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -159,7 +159,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[@Name="ThingBaseFox"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[@Name="ThingBaseFox"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Canines/Fetus_Dog</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -172,7 +172,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="Pig"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="Pig"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Livestocks/Fetus_Pig</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -185,7 +185,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[defName="WildBoar"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[defName="WildBoar"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Livestocks/Fetus_Pig</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			@ -198,7 +198,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAddModExtension">
 | 
			
		||||
		<xpath>Defs/ThingDef[@Name="BaseInsect"]</xpath>
 | 
			
		||||
		<xpath>/Defs/ThingDef[@Name="BaseInsect"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
				<li Class="RJW_Menstruation.PawnDNAModExtension">
 | 
			
		||||
					<fetusTexPath>Fetus/Insects/Fetus_Insect</fetusTexPath>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="CervineVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="CervineVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -32,7 +32,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="CactoidVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="CactoidVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -53,7 +53,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="TreeVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="TreeVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -74,7 +74,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="PistilVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="PistilVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -95,7 +95,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="NephilaSlimeVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="NephilaSlimeVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -116,7 +116,7 @@
 | 
			
		|||
	
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="GhostVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="GhostVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -137,7 +137,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="NecroVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="NecroVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="BigRaceBreats"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="BigRaceBreats"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -16,7 +16,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="OrcBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="OrcBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -28,7 +28,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="GhoulBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="GhoulBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -40,7 +40,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="GhostBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="GhostBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -52,7 +52,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="NecroBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="NecroBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -64,7 +64,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="NephilaBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="NephilaBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -76,7 +76,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="NephilaSlimeBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="NephilaSlimeBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			@ -88,7 +88,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="UdderBreasts"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="UdderBreasts"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Breast">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,7 @@
 | 
			
		|||
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="ElfVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="ElfVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -30,7 +30,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="ElfAnus"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="ElfAnus"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Anus">
 | 
			
		||||
| 
						 | 
				
			
			@ -41,7 +41,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="OrcVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="OrcVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -62,7 +62,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="OrcAnus"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="OrcAnus"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Anus">
 | 
			
		||||
| 
						 | 
				
			
			@ -75,7 +75,7 @@
 | 
			
		|||
	
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="GhoulVagina"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="GhoulVagina"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
			
		||||
| 
						 | 
				
			
			@ -96,7 +96,7 @@
 | 
			
		|||
	</Operation>
 | 
			
		||||
	
 | 
			
		||||
	<Operation Class="PatchOperationAdd">
 | 
			
		||||
		<xpath>Defs/rjw.HediffDef_PartBase[defName="GhoulAnus"]</xpath>
 | 
			
		||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="GhoulAnus"]</xpath>
 | 
			
		||||
		<value>
 | 
			
		||||
			<comps>
 | 
			
		||||
				<li Class="RJW_Menstruation.CompProperties_Anus">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -14,15 +14,10 @@ namespace RJW_Menstruation
 | 
			
		|||
            return pawn?.def is ThingDef_AlienRace;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static AlienPartGenerator.AlienComp GetHARComp(this Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            return pawn?.TryGetComp<AlienPartGenerator.AlienComp>();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static void CopyHARProperties(Pawn baby, Pawn original)
 | 
			
		||||
        {
 | 
			
		||||
            AlienPartGenerator.AlienComp babyHARComp = baby.GetHARComp();
 | 
			
		||||
            AlienPartGenerator.AlienComp originalHARComp = original.GetHARComp();
 | 
			
		||||
            AlienPartGenerator.AlienComp babyHARComp = baby?.TryGetComp<AlienPartGenerator.AlienComp>();
 | 
			
		||||
            AlienPartGenerator.AlienComp originalHARComp = original?.TryGetComp<AlienPartGenerator.AlienComp>();
 | 
			
		||||
            if (babyHARComp == null || originalHARComp == null) return;
 | 
			
		||||
            babyHARComp.crownType = originalHARComp.crownType;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -37,8 +32,8 @@ namespace RJW_Menstruation
 | 
			
		|||
        // HAR doesn't populate variants until the graphics are called for, so this has to happen late
 | 
			
		||||
        public static void CopyHARPropertiesPostBirth(Pawn baby, Pawn original)
 | 
			
		||||
        {
 | 
			
		||||
            AlienPartGenerator.AlienComp babyHARComp = baby.GetHARComp();
 | 
			
		||||
            AlienPartGenerator.AlienComp originalHARComp = original.GetHARComp();
 | 
			
		||||
            AlienPartGenerator.AlienComp babyHARComp = baby?.TryGetComp<AlienPartGenerator.AlienComp>();
 | 
			
		||||
            AlienPartGenerator.AlienComp originalHARComp = original?.TryGetComp<AlienPartGenerator.AlienComp>();
 | 
			
		||||
            if (babyHARComp == null || originalHARComp == null) return;
 | 
			
		||||
            if (originalHARComp.addonVariants != null)  // Testing has shown that the addons are valid by this point, but it's better to be safe
 | 
			
		||||
                babyHARComp.addonVariants = new List<int>(originalHARComp.addonVariants);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,7 +68,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            get
 | 
			
		||||
            {
 | 
			
		||||
                if (babyHalfAge > 0f) return babyHalfAge;
 | 
			
		||||
                List<LifeStageAge> ages = parent.pawn.def.race.lifeStageAges;
 | 
			
		||||
                List<LifeStageAge> ages = Pawn.def.race.lifeStageAges;
 | 
			
		||||
                if (ages?.Count > 1)
 | 
			
		||||
                    babyHalfAge = ages[1].minAge / 2;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -165,9 +165,8 @@ namespace RJW_Menstruation
 | 
			
		|||
            try
 | 
			
		||||
            {
 | 
			
		||||
                if (
 | 
			
		||||
                    !parent.pawn.IsHashIntervalTick(tickInterval) ||
 | 
			
		||||
                    !parent.pawn.Spawned ||  // TODO: Add option to simulate off-map pawns
 | 
			
		||||
                    parent.pawn.health.Dead
 | 
			
		||||
                    !Pawn.IsHashIntervalTick(tickInterval) ||
 | 
			
		||||
                    !Pawn.Spawned  // TODO: Add option to simulate off-map pawns
 | 
			
		||||
                    )
 | 
			
		||||
                {
 | 
			
		||||
                    return;
 | 
			
		||||
| 
						 | 
				
			
			@ -178,7 +177,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            }
 | 
			
		||||
            catch (Exception ex)
 | 
			
		||||
            {
 | 
			
		||||
                Log.Error($"Error processing breasts of {parent.pawn}: {ex}");
 | 
			
		||||
                Log.Error($"Error processing breasts of {Pawn}: {ex}");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -186,14 +185,14 @@ namespace RJW_Menstruation
 | 
			
		|||
        public override void CompPostPostAdd(DamageInfo? dinfo)
 | 
			
		||||
        {
 | 
			
		||||
            if (!loaded) Initialize();
 | 
			
		||||
            if (ageOfLastBirth > parent.pawn.ageTracker.AgeChronologicalTicks) ageOfLastBirth = CalculateLastBirth();   // catch transplant issues
 | 
			
		||||
            if (ageOfLastBirth > Pawn.ageTracker.AgeChronologicalTicks) ageOfLastBirth = CalculateLastBirth();   // catch transplant issues
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void CompPostPostRemoved()
 | 
			
		||||
        {
 | 
			
		||||
            if (parent.pawn.health.hediffSet.hediffs.Contains(parent))
 | 
			
		||||
            if (Pawn.health.hediffSet.hediffs.Contains(parent))
 | 
			
		||||
            {
 | 
			
		||||
                Log.Warning($"Attempted to remove breast comp from wrong pawn ({parent.pawn}).");
 | 
			
		||||
                Log.Warning($"Attempted to remove breast comp from wrong pawn ({Pawn}).");
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            base.CompPostPostRemoved();
 | 
			
		||||
| 
						 | 
				
			
			@ -202,23 +201,23 @@ namespace RJW_Menstruation
 | 
			
		|||
        protected long CalculateLastBirth()
 | 
			
		||||
        {
 | 
			
		||||
            long youngestAge = (long)(BabyHalfAge * GenDate.TicksPerYear) * -2; // So a newborn isn't considered a new mother, either
 | 
			
		||||
            if ((parent.pawn.relations?.ChildrenCount ?? 0) > 0)
 | 
			
		||||
            if ((Pawn.relations?.ChildrenCount ?? 0) > 0)
 | 
			
		||||
            {
 | 
			
		||||
                foreach (Pawn child in parent.pawn.relations.Children)
 | 
			
		||||
                foreach (Pawn child in Pawn.relations.Children)
 | 
			
		||||
                {
 | 
			
		||||
                    bool isFetus = false;
 | 
			
		||||
                    if (parent.pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().Any(preg => preg.babies.Contains(child)))
 | 
			
		||||
                    if (Pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().Any(preg => preg.babies.Contains(child)))
 | 
			
		||||
                    {
 | 
			
		||||
                        isFetus = true;
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
                    
 | 
			
		||||
                    if (
 | 
			
		||||
                        parent.pawn.ageTracker.BirthAbsTicks - child.ageTracker.BirthAbsTicks > ageOfLastBirth &&
 | 
			
		||||
                        Pawn.ageTracker.BirthAbsTicks - child.ageTracker.BirthAbsTicks > ageOfLastBirth &&
 | 
			
		||||
                        !isFetus &&
 | 
			
		||||
                        child.GetMother() == parent.pawn                        // Don't do Dad's boobs
 | 
			
		||||
                        child.GetMother() == Pawn                        // Don't do Dad's boobs
 | 
			
		||||
                        )
 | 
			
		||||
                        youngestAge = parent.pawn.ageTracker.BirthAbsTicks - child.ageTracker.BirthAbsTicks;
 | 
			
		||||
                        youngestAge = Pawn.ageTracker.BirthAbsTicks - child.ageTracker.BirthAbsTicks;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return youngestAge;
 | 
			
		||||
| 
						 | 
				
			
			@ -255,7 +254,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        protected void CalculateBreastSize()
 | 
			
		||||
        {
 | 
			
		||||
            // Scenario A: the youngest child is less than halfway into babyhood: Full size
 | 
			
		||||
            if (ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > parent.pawn.ageTracker.AgeBiologicalTicks)
 | 
			
		||||
            if (ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > Pawn.ageTracker.AgeBiologicalTicks)
 | 
			
		||||
            {
 | 
			
		||||
                debugGrowthStatus = "Full size due to young child";
 | 
			
		||||
                if (breastSizeIncreased < MaxBreastIncrement)
 | 
			
		||||
| 
						 | 
				
			
			@ -265,9 +264,9 @@ namespace RJW_Menstruation
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
            // Scenario B: Pregnant, grow in the second half of first trimester
 | 
			
		||||
            else if (parent.pawn.IsPregnant())
 | 
			
		||||
            else if (Pawn.IsRJWPregnant())
 | 
			
		||||
            {
 | 
			
		||||
                float pregnancySize = Mathf.InverseLerp(breastGrowthStart, breastGrowthEnd, parent.pawn.GetFarthestPregnancyProgress()) * MaxBreastIncrement;
 | 
			
		||||
                float pregnancySize = Mathf.InverseLerp(breastGrowthStart, breastGrowthEnd, Pawn.GetFarthestPregnancyProgress()) * MaxBreastIncrement;
 | 
			
		||||
                if (breastSizeIncreased > pregnancySize)
 | 
			
		||||
                {
 | 
			
		||||
                    debugGrowthStatus = "Shrinking due to being oversize for pregnancy";
 | 
			
		||||
| 
						 | 
				
			
			@ -299,13 +298,15 @@ namespace RJW_Menstruation
 | 
			
		|||
        protected void CalculateNipples()
 | 
			
		||||
        {
 | 
			
		||||
            float newNippleProgress;
 | 
			
		||||
            if (ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > parent.pawn.ageTracker.AgeBiologicalTicks)
 | 
			
		||||
            if (ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > Pawn.ageTracker.AgeBiologicalTicks)
 | 
			
		||||
                newNippleProgress = 1f;
 | 
			
		||||
            else if (parent.pawn.IsPregnant())
 | 
			
		||||
                newNippleProgress = nippleTransitions.Evaluate(parent.pawn.GetFarthestPregnancyProgress());
 | 
			
		||||
            else if (Pawn.IsRJWPregnant())
 | 
			
		||||
                newNippleProgress = nippleTransitions.Evaluate(Pawn.GetFarthestPregnancyProgress());
 | 
			
		||||
            else
 | 
			
		||||
                newNippleProgress = 0f;
 | 
			
		||||
 | 
			
		||||
            if (newNippleProgress < 0) newNippleProgress = 0;
 | 
			
		||||
 | 
			
		||||
            if (newNippleProgress == nippleProgress) return;    // Nothing to change
 | 
			
		||||
            else if (newNippleProgress > nippleProgress)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -352,7 +353,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            cachedNipple = baseNipple + nippleProgress * nippleChange;
 | 
			
		||||
 | 
			
		||||
            // For some reason, Props can go null when RJW relocates the chest (e.g. some animals), so catch that
 | 
			
		||||
            cachedColor = Colors.CMYKLerp(parent.pawn.story?.SkinColor ?? Color.white, (Props?.BlackNippleColor ?? CompProperties_Breast.DefaultBlacknippleColor.ToColor), Alpha);
 | 
			
		||||
            cachedColor = Colors.CMYKLerp(Pawn.story?.SkinColor ?? Color.white, (Props?.BlackNippleColor ?? CompProperties_Breast.DefaultBlacknippleColor.ToColor), Alpha);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void CopyBreastProperties(HediffComp_Breast original)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false;
 | 
			
		||||
                if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false;
 | 
			
		||||
 | 
			
		||||
                switch (curStage)
 | 
			
		||||
                {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using RimWorld.Planet;
 | 
			
		||||
using rjw;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
| 
						 | 
				
			
			@ -123,7 +124,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            get
 | 
			
		||||
            {
 | 
			
		||||
                if (pregnancy == null) return null;
 | 
			
		||||
                else if (!parent.pawn.health.hediffSet.hediffs.Contains(pregnancy))
 | 
			
		||||
                else if (!Pawn.health.hediffSet.hediffs.Contains(pregnancy))
 | 
			
		||||
                {
 | 
			
		||||
                    pregnancy = null;
 | 
			
		||||
                    return null;
 | 
			
		||||
| 
						 | 
				
			
			@ -142,7 +143,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                float avglittersize;
 | 
			
		||||
                try
 | 
			
		||||
                {
 | 
			
		||||
                    avglittersize = Mathf.Max(Rand.ByCurveAverage(parent.pawn.def.race.litterSizeCurve), 1.0f);
 | 
			
		||||
                    avglittersize = Mathf.Max(Rand.ByCurveAverage(Pawn.def.race.litterSizeCurve), 1.0f);
 | 
			
		||||
                }
 | 
			
		||||
                catch
 | 
			
		||||
                {
 | 
			
		||||
| 
						 | 
				
			
			@ -152,7 +153,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                opcache = (int)(RaceCyclesPerYear() *
 | 
			
		||||
                    avglittersize *
 | 
			
		||||
                    6f *
 | 
			
		||||
                    (parent.pawn.def.race.lifeExpectancy / ThingDefOf.Human.race.lifeExpectancy));
 | 
			
		||||
                    (Pawn.def.race.lifeExpectancy / ThingDefOf.Human.race.lifeExpectancy));
 | 
			
		||||
                return opcache;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -185,7 +186,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                float res = Props.maxCumCapacity * parent.pawn.BodySize;
 | 
			
		||||
                float res = Props.maxCumCapacity * Pawn.BodySize;
 | 
			
		||||
                if (curStage != Stage.Pregnant || (pregnancy?.Severity ?? 0f) < 0.175f) res *= 500f;
 | 
			
		||||
                return res;
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -195,7 +196,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                if (xxx.has_quirk(parent.pawn, "Breeder")) return 0.5f;
 | 
			
		||||
                if (xxx.has_quirk(Pawn, "Breeder")) return 0.5f;
 | 
			
		||||
 | 
			
		||||
                return 1.0f;
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -206,8 +207,8 @@ namespace RJW_Menstruation
 | 
			
		|||
            get
 | 
			
		||||
            {
 | 
			
		||||
                float factor = 1.0f;
 | 
			
		||||
                if (parent.pawn.Has(Quirk.Breeder)) factor = 10.0f;
 | 
			
		||||
                return parent.pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * factor;
 | 
			
		||||
                if (Pawn.Has(Quirk.Breeder)) factor = 10.0f;
 | 
			
		||||
                return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * factor;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        public IEnumerable<string> GetCumsInfo
 | 
			
		||||
| 
						 | 
				
			
			@ -419,7 +420,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        {
 | 
			
		||||
            get
 | 
			
		||||
            {
 | 
			
		||||
                if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false;
 | 
			
		||||
                if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false;
 | 
			
		||||
 | 
			
		||||
                switch (curStage)
 | 
			
		||||
                {
 | 
			
		||||
| 
						 | 
				
			
			@ -450,7 +451,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            {
 | 
			
		||||
                try
 | 
			
		||||
                {
 | 
			
		||||
                    Color c = parent.pawn.def.race.BloodDef.graphicData.color;
 | 
			
		||||
                    Color c = Pawn.def.race.BloodDef.graphicData.color;
 | 
			
		||||
                    return c;
 | 
			
		||||
                }
 | 
			
		||||
                catch
 | 
			
		||||
| 
						 | 
				
			
			@ -466,7 +467,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            {
 | 
			
		||||
                if (breastcache == null)
 | 
			
		||||
                {
 | 
			
		||||
                    breastcache = parent.pawn.GetBreastComp();
 | 
			
		||||
                    breastcache = Pawn.GetBreastComp();
 | 
			
		||||
                }
 | 
			
		||||
                return breastcache;
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -505,8 +506,8 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
                // Luteal will appear to progress, hitting the end of the phase when the pregnancy is discovered
 | 
			
		||||
                float discoveryTime = 0.5f;
 | 
			
		||||
                if (parent.pawn.story?.bodyType == BodyTypeDefOf.Thin) discoveryTime = 0.25f;
 | 
			
		||||
                else if (parent.pawn.story?.bodyType == BodyTypeDefOf.Female) discoveryTime = 0.35f;
 | 
			
		||||
                if (Pawn.story?.bodyType == BodyTypeDefOf.Thin) discoveryTime = 0.25f;
 | 
			
		||||
                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 * 24));
 | 
			
		||||
                
 | 
			
		||||
| 
						 | 
				
			
			@ -558,17 +559,16 @@ namespace RJW_Menstruation
 | 
			
		|||
            try
 | 
			
		||||
            {
 | 
			
		||||
                if (
 | 
			
		||||
                    !parent.pawn.IsHashIntervalTick(tickInterval) ||
 | 
			
		||||
                    !parent.pawn.Spawned || // TODO: Add option to simulate off-map pawns
 | 
			
		||||
                    parent.pawn.health.Dead ||
 | 
			
		||||
                    (parent.pawn.IsAnimal() && !Configurations.EnableAnimalCycle)
 | 
			
		||||
                    !Pawn.IsHashIntervalTick(tickInterval) ||
 | 
			
		||||
                    !Pawn.Spawned || // TODO: Add option to simulate off-map pawns
 | 
			
		||||
                    (Pawn.IsAnimal() && !Configurations.EnableAnimalCycle)
 | 
			
		||||
                    )
 | 
			
		||||
                {
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                CumOut();
 | 
			
		||||
                if (pregnancy == null && parent.pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) curStage = Stage.Young;
 | 
			
		||||
                if (pregnancy == null && Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) curStage = Stage.Young;
 | 
			
		||||
                switch (curStage)
 | 
			
		||||
                {
 | 
			
		||||
                    case Stage.Follicular:
 | 
			
		||||
| 
						 | 
				
			
			@ -614,7 +614,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            }
 | 
			
		||||
            catch (Exception ex)
 | 
			
		||||
            {
 | 
			
		||||
                Log.Error($"Error processing womb of {parent.pawn}: {ex}");
 | 
			
		||||
                Log.Error($"Error processing womb of {Pawn}: {ex}");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -622,12 +622,13 @@ namespace RJW_Menstruation
 | 
			
		|||
        {
 | 
			
		||||
            // If a hediff is removed from a pawn that does not have it, CompPostPostRemoved is still called on the pawn that does.
 | 
			
		||||
            // If it was a legitimate removal, then it won't be in this pawn's hediff list anymore, as that removal occurs first
 | 
			
		||||
            if (parent.pawn.health.hediffSet.hediffs.Contains(parent))
 | 
			
		||||
            if (Pawn.health.hediffSet.hediffs.Contains(parent))
 | 
			
		||||
            {
 | 
			
		||||
                Log.Warning($"Attempted to remove menstruation comp from wrong pawn ({parent.pawn}).");
 | 
			
		||||
                Log.Warning($"Attempted to remove menstruation comp from wrong pawn ({Pawn}).");
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            pregnancy?.Miscarry();
 | 
			
		||||
            if (!(pregnancy is Hediff_MechanoidPregnancy))
 | 
			
		||||
                pregnancy.Miscarry();
 | 
			
		||||
            base.CompPostPostRemoved();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -666,7 +667,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        public void CumIn(Pawn pawn, float volume, float fertility = 1.0f, ThingDef filthdef = null)
 | 
			
		||||
        {
 | 
			
		||||
            if (volume <= 0) return;
 | 
			
		||||
            if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) fertility /= 100f;
 | 
			
		||||
            if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) fertility /= 100f;
 | 
			
		||||
            float cumd = TotalCumPercent;
 | 
			
		||||
            float tmp = TotalCum + volume;
 | 
			
		||||
            if (tmp > CumCapacity)
 | 
			
		||||
| 
						 | 
				
			
			@ -700,7 +701,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            }
 | 
			
		||||
            cumd = TotalCumPercent - cumd;
 | 
			
		||||
 | 
			
		||||
            parent.pawn.records.AddTo(VariousDefOf.AmountofCreampied, volume);
 | 
			
		||||
            Pawn.records.AddTo(VariousDefOf.AmountofCreampied, volume);
 | 
			
		||||
            AfterCumIn(pawn);
 | 
			
		||||
            AfterFluidIn(cumd);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -776,13 +777,13 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        protected void BeforeCumOut(out Absorber absorber)
 | 
			
		||||
        {
 | 
			
		||||
            Hediff asa = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_ASA);
 | 
			
		||||
            Hediff asa = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_ASA);
 | 
			
		||||
            float asafactor = asa?.Severity ?? 0f;
 | 
			
		||||
 | 
			
		||||
            if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) antisperm = 0.70f + asafactor;
 | 
			
		||||
            if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) antisperm = 0.70f + asafactor;
 | 
			
		||||
            else antisperm = 0.0f + asafactor;
 | 
			
		||||
 | 
			
		||||
            absorber = (Absorber)parent.pawn.apparel?.WornApparel?.Find(x => x is Absorber);
 | 
			
		||||
            absorber = (Absorber)Pawn.apparel?.WornApparel?.Find(x => x is Absorber);
 | 
			
		||||
            if (absorber != null)
 | 
			
		||||
            {
 | 
			
		||||
                absorber.WearEffect();
 | 
			
		||||
| 
						 | 
				
			
			@ -795,7 +796,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        /// </summary>
 | 
			
		||||
        protected virtual void AfterCumOut()
 | 
			
		||||
        {
 | 
			
		||||
            parent.pawn.needs?.mood?.thoughts?.memories?.TryGainMemory(VariousDefOf.LeakingFluids);
 | 
			
		||||
            Pawn.needs?.mood?.thoughts?.memories?.TryGainMemory(VariousDefOf.LeakingFluids);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
| 
						 | 
				
			
			@ -821,13 +822,13 @@ namespace RJW_Menstruation
 | 
			
		|||
            List<string> filthlabels = new List<string>();
 | 
			
		||||
            BeforeCumOut(out Absorber absorber);
 | 
			
		||||
            if (cums.NullOrEmpty()) return;
 | 
			
		||||
            if (TotalCum > Props.maxCumCapacity * parent.pawn.BodySize) leakfactor = Math.Min(1 + (TotalCum - Props.maxCumCapacity * parent.pawn.BodySize) / 10, 2f);
 | 
			
		||||
            if (TotalCum > Props.maxCumCapacity * Pawn.BodySize) leakfactor = Math.Min(1 + (TotalCum - Props.maxCumCapacity * Pawn.BodySize) / 10, 2f);
 | 
			
		||||
            if (absorber != null && absorber.dirty && !absorber.LeakAfterDirty) leakfactor = 0f;
 | 
			
		||||
            if (parent.pawn.jobs?.curJob?.def == rjw.xxx.knotted) leakfactor = 0f;
 | 
			
		||||
            if (Pawn.jobs?.curJob?.def == xxx.knotted) leakfactor = 0f;
 | 
			
		||||
            List<Cum> removecums = new List<Cum>();
 | 
			
		||||
            foreach (Cum cum in cums)
 | 
			
		||||
            {
 | 
			
		||||
                cum.CumEffects(parent.pawn);
 | 
			
		||||
                cum.CumEffects(Pawn);
 | 
			
		||||
                float vd = cum.DismishNatural(leakfactor, antisperm);
 | 
			
		||||
                cum.MakeThinner(Configurations.CycleAcceleration);
 | 
			
		||||
                totalleak += AbsorbCum(vd, absorber);
 | 
			
		||||
| 
						 | 
				
			
			@ -912,7 +913,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                cums.Remove(cum);
 | 
			
		||||
            }
 | 
			
		||||
            removecums.Clear();
 | 
			
		||||
            return new CumMixture(parent.pawn, totalleak, cumlabels, color, mixtureDef, pure);
 | 
			
		||||
            return new CumMixture(Pawn, totalleak, cumlabels, color, mixtureDef, pure);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
| 
						 | 
				
			
			@ -958,7 +959,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            if (cycleVariability < 0f) cycleVariability = MenstruationUtility.RandomVariabilityPercent();
 | 
			
		||||
            if (currentIntervalHours < 0)
 | 
			
		||||
            {
 | 
			
		||||
                if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) curStage = Stage.Young;
 | 
			
		||||
                if (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) curStage = Stage.Young;
 | 
			
		||||
                else if (!IsBreedingSeason()) curStage = Stage.Anestrus;
 | 
			
		||||
                else curStage = RandomStage();
 | 
			
		||||
                if (curStage == Stage.Follicular)
 | 
			
		||||
| 
						 | 
				
			
			@ -978,7 +979,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            if (pregnancy == null)
 | 
			
		||||
            {
 | 
			
		||||
                // If this womb isn't marked pregnant, search for pregnancies that have no womb and claim one
 | 
			
		||||
                foreach (Hediff_BasePregnancy preg in parent.pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>())
 | 
			
		||||
                foreach (Hediff_BasePregnancy preg in Pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>())
 | 
			
		||||
                {
 | 
			
		||||
                    if (preg.GetMenstruationComp() == null)
 | 
			
		||||
                    {
 | 
			
		||||
| 
						 | 
				
			
			@ -990,7 +991,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            //Log.Message(parent.pawn.Label + " - Initialized menstruation comp");
 | 
			
		||||
            //Log.Message(Pawn.Label + " - Initialized menstruation comp");
 | 
			
		||||
            loaded = true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1016,19 +1017,18 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        public int GetOvaryPowerByAge()
 | 
			
		||||
        {
 | 
			
		||||
            Pawn pawn = parent.pawn;
 | 
			
		||||
            float avglittersize;
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                avglittersize = Mathf.Max(Rand.ByCurveAverage(pawn.def.race.litterSizeCurve), 1.0f);
 | 
			
		||||
                avglittersize = Mathf.Max(Rand.ByCurveAverage(Pawn.def.race.litterSizeCurve), 1.0f);
 | 
			
		||||
            }
 | 
			
		||||
            catch (NullReferenceException)
 | 
			
		||||
            {
 | 
			
		||||
                avglittersize = 1.0f;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            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);
 | 
			
		||||
            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);
 | 
			
		||||
            if (fertEndAge < fertStartAge) fertEndAge = fertStartAge;
 | 
			
		||||
 | 
			
		||||
            float raceCyclesPerYear = RaceCyclesPerYear();
 | 
			
		||||
| 
						 | 
				
			
			@ -1036,7 +1036,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            int lifetimeEggs = (int)(lifetimeCycles * avglittersize * Utility.RandGaussianLike(0.70f, 1.30f, 5));
 | 
			
		||||
 | 
			
		||||
            float pawnCyclesPerYear = raceCyclesPerYear * cycleSpeed;
 | 
			
		||||
            float pawnCyclesElapsed = Mathf.Max((pawn.ageTracker.AgeBiologicalYearsFloat - fertStartAge) * pawnCyclesPerYear, 0.0f);
 | 
			
		||||
            float pawnCyclesElapsed = Mathf.Max((Pawn.ageTracker.AgeBiologicalYearsFloat - fertStartAge) * pawnCyclesPerYear, 0.0f);
 | 
			
		||||
            int pawnEggsUsed = PawnEggsUsed(pawnCyclesElapsed, avglittersize);
 | 
			
		||||
 | 
			
		||||
            return Math.Max(lifetimeEggs - pawnEggsUsed, 0);
 | 
			
		||||
| 
						 | 
				
			
			@ -1053,16 +1053,16 @@ namespace RJW_Menstruation
 | 
			
		|||
                ovarypower = GetOvaryPowerByAge();
 | 
			
		||||
                if (ovarypower < 1)
 | 
			
		||||
                {
 | 
			
		||||
                    Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, parent.pawn);
 | 
			
		||||
                    Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, Pawn);
 | 
			
		||||
                    hediff.Severity = 0.2f;
 | 
			
		||||
                    parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
 | 
			
		||||
                    Pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(Pawn));
 | 
			
		||||
                    curStage = Stage.Young;
 | 
			
		||||
                }
 | 
			
		||||
                else if (ovarypower < OvaryPowerThreshold)
 | 
			
		||||
                {
 | 
			
		||||
                    Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Climacteric, parent.pawn);
 | 
			
		||||
                    Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Climacteric, Pawn);
 | 
			
		||||
                    hediff.Severity = Mathf.InverseLerp(OvaryPowerThreshold, 0, ovarypower);
 | 
			
		||||
                    parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
 | 
			
		||||
                    Pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(Pawn));
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -1081,7 +1081,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        {
 | 
			
		||||
            if (Configurations.EnableMenopause && ovarypower < OvaryPowerThreshold)
 | 
			
		||||
            {
 | 
			
		||||
                if (sexNeed == null) sexNeed = parent.pawn.needs.TryGetNeed(VariousDefOf.SexNeed);
 | 
			
		||||
                if (sexNeed == null) sexNeed = Pawn.needs.TryGetNeed(VariousDefOf.SexNeed);
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    if (sexNeed.CurLevel < 0.5) sexNeed.CurLevel += 0.01f;
 | 
			
		||||
| 
						 | 
				
			
			@ -1092,16 +1092,16 @@ namespace RJW_Menstruation
 | 
			
		|||
        public void SetEstrus(int days)
 | 
			
		||||
        {
 | 
			
		||||
            HediffDef estrusdef = Props.concealedEstrus ? VariousDefOf.Hediff_Estrus_Concealed : VariousDefOf.Hediff_Estrus;
 | 
			
		||||
            Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(estrusdef);
 | 
			
		||||
            Hediff hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(estrusdef);
 | 
			
		||||
 | 
			
		||||
            if (Props.concealedEstrus)
 | 
			
		||||
            {
 | 
			
		||||
                if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Estrus)) return;
 | 
			
		||||
                if (Pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Estrus)) return;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                Hediff concealedHediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Estrus_Concealed);
 | 
			
		||||
                if (concealedHediff != null) parent.pawn.health.RemoveHediff(concealedHediff);
 | 
			
		||||
                Hediff concealedHediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Estrus_Concealed);
 | 
			
		||||
                if (concealedHediff != null) Pawn.health.RemoveHediff(concealedHediff);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (hediff != null)
 | 
			
		||||
| 
						 | 
				
			
			@ -1110,19 +1110,20 @@ namespace RJW_Menstruation
 | 
			
		|||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                hediff = HediffMaker.MakeHediff(estrusdef, parent.pawn);
 | 
			
		||||
                hediff = HediffMaker.MakeHediff(estrusdef, Pawn);
 | 
			
		||||
                hediff.Severity = (float)days / Configurations.CycleAcceleration + 0.2f;
 | 
			
		||||
                parent.pawn.health.AddHediff(hediff);
 | 
			
		||||
                Pawn.health.AddHediff(hediff);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool IsBreedingSeason()
 | 
			
		||||
        {
 | 
			
		||||
            if (Props.breedingSeason == SeasonalBreed.Always) return true;
 | 
			
		||||
            Map map = parent.pawn.Map;
 | 
			
		||||
            if (map == null) map = Find.AnyPlayerHomeMap;
 | 
			
		||||
            if (map == null) return true;
 | 
			
		||||
            switch (GenLocalDate.Season(map))
 | 
			
		||||
 | 
			
		||||
            int tile = Pawn.Tile;
 | 
			
		||||
            if (tile < 0) tile = Find.AnyPlayerHomeMap?.Tile ?? -1;
 | 
			
		||||
            if (tile < 0) return true;
 | 
			
		||||
            switch (GenLocalDate.Season(tile))
 | 
			
		||||
            {
 | 
			
		||||
                case Season.Spring:
 | 
			
		||||
                    return (Props.breedingSeason & SeasonalBreed.Spring) != 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -1142,7 +1143,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        protected Pawn Fertilize()
 | 
			
		||||
        {
 | 
			
		||||
            if (cums.NullOrEmpty()) return null;
 | 
			
		||||
            List<Cum> eligibleCum = cums.FindAll(cum => !cum.notcum && cum.FertVolume > 0 && cum.pawn != null && (RJWPregnancySettings.bestial_pregnancy_enabled || xxx.is_animal(parent.pawn) == xxx.is_animal(cum.pawn)));
 | 
			
		||||
            List<Cum> eligibleCum = cums.FindAll(cum => !cum.notcum && cum.FertVolume > 0 && cum.pawn != null && (RJWPregnancySettings.bestial_pregnancy_enabled || xxx.is_animal(Pawn) == xxx.is_animal(cum.pawn)));
 | 
			
		||||
            if (eligibleCum.Count == 0) return null;
 | 
			
		||||
 | 
			
		||||
            float totalFertPower = eligibleCum.Sum(cum => cum.FertVolume);
 | 
			
		||||
| 
						 | 
				
			
			@ -1150,7 +1151,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            if (Rand.Range(0.0f, 1.0f) > 1.0f - Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor))
 | 
			
		||||
                return null;
 | 
			
		||||
 | 
			
		||||
            parent.pawn.records.AddTo(VariousDefOf.AmountofFertilizedEggs, 1);
 | 
			
		||||
            Pawn.records.AddTo(VariousDefOf.AmountofFertilizedEggs, 1);
 | 
			
		||||
            float selection = Rand.Range(0.0f, totalFertPower);
 | 
			
		||||
 | 
			
		||||
            foreach (Cum cum in eligibleCum)
 | 
			
		||||
| 
						 | 
				
			
			@ -1181,7 +1182,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                    deadeggs.Add(egg);
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
                else if (parent.pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().Any() || pregnancy is Hediff_MechanoidPregnancy)
 | 
			
		||||
                else if (Pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().Any() || pregnancy is Hediff_MechanoidPregnancy)
 | 
			
		||||
                {
 | 
			
		||||
                    deadeggs.Add(egg);
 | 
			
		||||
                    continue;
 | 
			
		||||
| 
						 | 
				
			
			@ -1194,7 +1195,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                        {
 | 
			
		||||
                            if (pregnancy is Hediff_MultiplePregnancy h)
 | 
			
		||||
                            {
 | 
			
		||||
                                h.AddNewBaby(parent.pawn, egg.fertilizer);
 | 
			
		||||
                                h.AddNewBaby(Pawn, egg.fertilizer);
 | 
			
		||||
                            }
 | 
			
		||||
                            pregnant = true;
 | 
			
		||||
                            deadeggs.Add(egg);
 | 
			
		||||
| 
						 | 
				
			
			@ -1209,15 +1210,15 @@ namespace RJW_Menstruation
 | 
			
		|||
                    {
 | 
			
		||||
                        if (!Configurations.UseMultiplePregnancy)
 | 
			
		||||
                        {
 | 
			
		||||
                            PregnancyHelper.PregnancyDecider(parent.pawn, egg.fertilizer);
 | 
			
		||||
                            PregnancyHelper.PregnancyDecider(Pawn, egg.fertilizer);
 | 
			
		||||
                            // I hate having to do this, but it gets the newest pregnancy
 | 
			
		||||
                            pregnancy = parent.pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().MaxBy(hediff => hediff.loadID);
 | 
			
		||||
                            pregnancy = Pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().MaxBy(hediff => hediff.loadID);
 | 
			
		||||
                            pregnant = true;
 | 
			
		||||
                            break;
 | 
			
		||||
                        }
 | 
			
		||||
                        else
 | 
			
		||||
                        {
 | 
			
		||||
                            pregnancy = Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(parent.pawn, egg.fertilizer);
 | 
			
		||||
                            pregnancy = Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(Pawn, egg.fertilizer);
 | 
			
		||||
                            pregnant = true;
 | 
			
		||||
                            deadeggs.Add(egg);
 | 
			
		||||
                        }
 | 
			
		||||
| 
						 | 
				
			
			@ -1246,8 +1247,7 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        protected void BleedOut()
 | 
			
		||||
        {
 | 
			
		||||
            //FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, ThingDefOf.Filth_Blood,parent.pawn.Label);
 | 
			
		||||
            CumIn(parent.pawn, Rand.Range(0.02f * Configurations.BleedingAmount, 0.04f * Configurations.BleedingAmount), Translations.Menstrual_Blood, -5.0f, parent.pawn.def.race?.BloodDef ?? ThingDefOf.Filth_Blood);
 | 
			
		||||
            CumIn(Pawn, Rand.Range(0.02f * Configurations.BleedingAmount, 0.04f * Configurations.BleedingAmount), Translations.Menstrual_Blood, -5.0f, Pawn.def.race?.BloodDef ?? ThingDefOf.Filth_Blood);
 | 
			
		||||
            Cum blood = GetNotCum(Translations.Menstrual_Blood);
 | 
			
		||||
            if (blood != null) blood.Color = BloodColor;
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -1259,7 +1259,8 @@ namespace RJW_Menstruation
 | 
			
		|||
        /// <param name="amount"></param>
 | 
			
		||||
        protected void MakeCumFilth(Cum cum, float amount)
 | 
			
		||||
        {
 | 
			
		||||
            if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn?.LabelShort ?? "Unknown");
 | 
			
		||||
            if (Pawn.Map == null) return;
 | 
			
		||||
            if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(Pawn.Position, Pawn.Map, cum.FilthDef, cum.pawn?.LabelShort ?? "Unknown");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
| 
						 | 
				
			
			@ -1274,7 +1275,7 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
            if (absorber == null)
 | 
			
		||||
            {
 | 
			
		||||
                //if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn.LabelShort);
 | 
			
		||||
                //if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(Pawn.Position, Pawn.Map, cum.FilthDef, cum.pawn.LabelShort);
 | 
			
		||||
                return amount;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1282,11 +1283,11 @@ namespace RJW_Menstruation
 | 
			
		|||
            absorber.SetColor(Colors.CMYKLerp(GetCumMixtureColor, absorber.DrawColor, 1f - amount / absorbable));
 | 
			
		||||
            if (absorber.dirty)
 | 
			
		||||
            {
 | 
			
		||||
                //if (absorber.LeakAfterDirty) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn.LabelShort);
 | 
			
		||||
                //if (absorber.LeakAfterDirty) FilthMaker.TryMakeFilth(Pawn.Position, Pawn.Map, cum.FilthDef, cum.pawn.LabelShort);
 | 
			
		||||
                return amount;
 | 
			
		||||
            }
 | 
			
		||||
            absorber.absorbedfluids += amount;
 | 
			
		||||
            if (absorber.absorbedfluids > absorbable && !parent.pawn.apparel.IsLocked(absorber))
 | 
			
		||||
            if (absorber.absorbedfluids > absorbable && !Pawn.apparel.IsLocked(absorber))
 | 
			
		||||
            {
 | 
			
		||||
                absorber.def = absorber.DirtyDef;
 | 
			
		||||
                //absorber.fluidColor = GetCumMixtureColor;
 | 
			
		||||
| 
						 | 
				
			
			@ -1297,10 +1298,10 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        protected float MakeCumFilthMixture(float amount, List<string> cumlabels)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            if (Pawn.Map == null) return 0;
 | 
			
		||||
            if (amount >= minmakefilthvalue)
 | 
			
		||||
            {
 | 
			
		||||
                FilthMaker_Colored.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, VariousDefOf.FilthMixture, cumlabels, GetCumMixtureColor, false);
 | 
			
		||||
                FilthMaker_Colored.TryMakeFilth(Pawn.Position, Pawn.Map, VariousDefOf.FilthMixture, cumlabels, GetCumMixtureColor, false);
 | 
			
		||||
            }
 | 
			
		||||
            return amount;
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -1333,11 +1334,11 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        protected void AddCrampPain()
 | 
			
		||||
        {
 | 
			
		||||
            Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_MenstrualCramp, parent.pawn);
 | 
			
		||||
            Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_MenstrualCramp, Pawn);
 | 
			
		||||
            hediff.Severity = crampPain * Rand.Range(0.9f, 1.1f);
 | 
			
		||||
            HediffCompProperties_SeverityPerDay Prop = (HediffCompProperties_SeverityPerDay)hediff.TryGetComp<HediffComp_SeverityPerDay>().props;
 | 
			
		||||
            Prop.severityPerDay = -hediff.Severity / (currentIntervalHours / 24) * Configurations.CycleAcceleration;
 | 
			
		||||
            parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
 | 
			
		||||
            Pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(Pawn));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected virtual void FollicularAction(bool climacteric)
 | 
			
		||||
| 
						 | 
				
			
			@ -1381,7 +1382,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            float eggnum;
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                eggnum = Rand.ByCurve(parent.pawn.def.race.litterSizeCurve);
 | 
			
		||||
                eggnum = Rand.ByCurve(Pawn.def.race.litterSizeCurve);
 | 
			
		||||
            }
 | 
			
		||||
            catch (NullReferenceException)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -1389,7 +1390,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            }
 | 
			
		||||
            catch (ArgumentException e)
 | 
			
		||||
            {
 | 
			
		||||
                Log.Warning($"Invalid litterSizeCurve for {parent.pawn.def}: {e}");
 | 
			
		||||
                Log.Warning($"Invalid litterSizeCurve for {Pawn.def}: {e}");
 | 
			
		||||
                eggnum = 1;
 | 
			
		||||
            }
 | 
			
		||||
            eggnum += eggstack;
 | 
			
		||||
| 
						 | 
				
			
			@ -1404,19 +1405,19 @@ namespace RJW_Menstruation
 | 
			
		|||
            if (Configurations.EnableMenopause && ovarypower < 1)
 | 
			
		||||
            {
 | 
			
		||||
                eggs.Clear();
 | 
			
		||||
                Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Climacteric);
 | 
			
		||||
                if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
 | 
			
		||||
                hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, parent.pawn);
 | 
			
		||||
                Hediff hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Climacteric);
 | 
			
		||||
                if (hediff != null) Pawn.health.RemoveHediff(hediff);
 | 
			
		||||
                hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, Pawn);
 | 
			
		||||
                hediff.Severity = 0.2f;
 | 
			
		||||
                parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
 | 
			
		||||
                Pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(Pawn));
 | 
			
		||||
                ovarypower = 0;
 | 
			
		||||
                GoNextStage(Stage.Young);
 | 
			
		||||
            }
 | 
			
		||||
            else if (Configurations.EnableMenopause && ovarypower < OvaryPowerThreshold)
 | 
			
		||||
            {
 | 
			
		||||
                Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Climacteric, parent.pawn);
 | 
			
		||||
                Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Climacteric, Pawn);
 | 
			
		||||
                hediff.Severity = Mathf.InverseLerp(OvaryPowerThreshold, 0, ovarypower);
 | 
			
		||||
                parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
 | 
			
		||||
                Pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(Pawn));
 | 
			
		||||
                GoNextStage(Stage.ClimactericLuteal);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
| 
						 | 
				
			
			@ -1483,8 +1484,8 @@ namespace RJW_Menstruation
 | 
			
		|||
            }
 | 
			
		||||
            else if (curStageHrs >= currentIntervalHours)
 | 
			
		||||
            {
 | 
			
		||||
                Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp);
 | 
			
		||||
                if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
 | 
			
		||||
                Hediff hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp);
 | 
			
		||||
                if (hediff != null) Pawn.health.RemoveHediff(hediff);
 | 
			
		||||
                int totalFollicularHours = PeriodRandomizer(climacteric ? Stage.ClimactericFollicular : Stage.Follicular, climacteric ? 6.0f : 1.0f);  // The total amount of time for both bleeding and follicular
 | 
			
		||||
                if (totalFollicularHours <= currentIntervalHours)   // We've bled for so long that we completely missed the follicular phase
 | 
			
		||||
                    GoOvulatoryStage(climacteric);
 | 
			
		||||
| 
						 | 
				
			
			@ -1511,7 +1512,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                Implant();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (parent.pawn.health.hediffSet.hediffs.Contains(pregnancy))
 | 
			
		||||
            if (Pawn.health.hediffSet.hediffs.Contains(pregnancy))
 | 
			
		||||
            {
 | 
			
		||||
                curStageHrs += 1;
 | 
			
		||||
                StayCurrentStageConst(Stage.Pregnant);
 | 
			
		||||
| 
						 | 
				
			
			@ -1531,7 +1532,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                {
 | 
			
		||||
                    GoNextStage(Stage.ClimactericFollicular);
 | 
			
		||||
                }
 | 
			
		||||
                else if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) == 0)
 | 
			
		||||
                else if (Pawn.health.capacities.GetLevel(xxx.reproduction) == 0)
 | 
			
		||||
                {
 | 
			
		||||
                    GoNextStage(Stage.Young);
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			@ -1553,7 +1554,7 @@ namespace RJW_Menstruation
 | 
			
		|||
            {
 | 
			
		||||
                RemoveClimactericEffect();
 | 
			
		||||
            }
 | 
			
		||||
            if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) <= 0)
 | 
			
		||||
            if (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0)
 | 
			
		||||
            {
 | 
			
		||||
                StayCurrentStageConst(Stage.Young);
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -1578,54 +1579,54 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        protected virtual void ThoughtCumInside(Pawn cummer)
 | 
			
		||||
        {
 | 
			
		||||
            if (!xxx.is_human(parent.pawn) || !xxx.is_human(cummer)) return;
 | 
			
		||||
            if (!xxx.is_human(Pawn) || !xxx.is_human(cummer)) return;
 | 
			
		||||
 | 
			
		||||
            if ((cummer.Has(Quirk.Teratophile) != (parent.pawn.GetStatValue(StatDefOf.PawnBeauty) >= 0)) ||
 | 
			
		||||
            if ((cummer.Has(Quirk.Teratophile) != (Pawn.GetStatValue(StatDefOf.PawnBeauty) >= 0)) ||
 | 
			
		||||
                cummer.Has(Quirk.ImpregnationFetish) ||
 | 
			
		||||
                cummer.Has(Quirk.Breeder))
 | 
			
		||||
            {
 | 
			
		||||
                if (cummer.relations.OpinionOf(parent.pawn) <= -25)
 | 
			
		||||
                if (cummer.relations.OpinionOf(Pawn) <= -25)
 | 
			
		||||
                {
 | 
			
		||||
                    cummer.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.HaterCameInsideM, parent.pawn);
 | 
			
		||||
                    cummer.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.HaterCameInsideM, Pawn);
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    cummer.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideM, parent.pawn);
 | 
			
		||||
                    cummer.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideM, Pawn);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (IsDangerDay)
 | 
			
		||||
            {
 | 
			
		||||
                if (parent.pawn.Has(Quirk.Breeder) || parent.pawn.Has(Quirk.ImpregnationFetish))
 | 
			
		||||
                if (Pawn.Has(Quirk.Breeder) || Pawn.Has(Quirk.ImpregnationFetish))
 | 
			
		||||
                {
 | 
			
		||||
                    parent.pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetish, cummer);
 | 
			
		||||
                    Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetish, cummer);
 | 
			
		||||
                }
 | 
			
		||||
                else if (parent.pawn.relations.OpinionOf(cummer) <= -5)
 | 
			
		||||
                else if (Pawn.relations.OpinionOf(cummer) <= -5)
 | 
			
		||||
                {
 | 
			
		||||
                    parent.pawn.needs.mood.thoughts.memories.RemoveMemoriesOfDefWhereOtherPawnIs(VariousDefOf.CameInsideF, cummer);
 | 
			
		||||
                    parent.pawn.needs.mood.thoughts.memories.RemoveMemoriesOfDefWhereOtherPawnIs(VariousDefOf.HaterCameInsideFEstrus, cummer);
 | 
			
		||||
                    parent.pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.HaterCameInsideF, cummer);
 | 
			
		||||
                    Pawn.needs.mood.thoughts.memories.RemoveMemoriesOfDefWhereOtherPawnIs(VariousDefOf.CameInsideF, cummer);
 | 
			
		||||
                    Pawn.needs.mood.thoughts.memories.RemoveMemoriesOfDefWhereOtherPawnIs(VariousDefOf.HaterCameInsideFEstrus, cummer);
 | 
			
		||||
                    Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.HaterCameInsideF, cummer);
 | 
			
		||||
                }
 | 
			
		||||
                else if (parent.pawn.IsInEstrus() && parent.pawn.relations.OpinionOf(cummer) < RJWHookupSettings.MinimumRelationshipToHookup)
 | 
			
		||||
                else if (Pawn.IsInEstrus() && Pawn.relations.OpinionOf(cummer) < RJWHookupSettings.MinimumRelationshipToHookup)
 | 
			
		||||
                {
 | 
			
		||||
                    parent.pawn.needs.mood.thoughts.memories.RemoveMemoriesOfDefWhereOtherPawnIs(VariousDefOf.CameInsideF, cummer);
 | 
			
		||||
                    parent.pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.HaterCameInsideFEstrus, cummer);
 | 
			
		||||
                    Pawn.needs.mood.thoughts.memories.RemoveMemoriesOfDefWhereOtherPawnIs(VariousDefOf.CameInsideF, cummer);
 | 
			
		||||
                    Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.HaterCameInsideFEstrus, cummer);
 | 
			
		||||
                }
 | 
			
		||||
                else if (!parent.pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, cummer) && !parent.pawn.relations.DirectRelationExists(PawnRelationDefOf.Fiance, cummer))
 | 
			
		||||
                else if (!Pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, cummer) && !Pawn.relations.DirectRelationExists(PawnRelationDefOf.Fiance, cummer))
 | 
			
		||||
                {
 | 
			
		||||
                    if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) < 0.50f) parent.pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFLowFert, cummer);
 | 
			
		||||
                    else parent.pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideF, cummer);
 | 
			
		||||
                    if (Pawn.health.capacities.GetLevel(xxx.reproduction) < 0.50f) Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFLowFert, cummer);
 | 
			
		||||
                    else Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideF, cummer);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                if (parent.pawn.Has(Quirk.Breeder) || parent.pawn.Has(Quirk.ImpregnationFetish))
 | 
			
		||||
                if (Pawn.Has(Quirk.Breeder) || Pawn.Has(Quirk.ImpregnationFetish))
 | 
			
		||||
                {
 | 
			
		||||
                    parent.pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetishSafe, cummer);
 | 
			
		||||
                    Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetishSafe, cummer);
 | 
			
		||||
                }
 | 
			
		||||
                else if (parent.pawn.relations.OpinionOf(cummer) <= -5)
 | 
			
		||||
                else if (Pawn.relations.OpinionOf(cummer) <= -5)
 | 
			
		||||
                {
 | 
			
		||||
                    parent.pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.HaterCameInsideFSafe, cummer);
 | 
			
		||||
                    Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.HaterCameInsideFSafe, cummer);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -1633,11 +1634,11 @@ namespace RJW_Menstruation
 | 
			
		|||
        protected virtual void TaleCumInside(Pawn cummer)
 | 
			
		||||
        {
 | 
			
		||||
            // Only make the tale for human-on-human, consentual sex. Otherwise the art just gets too hard to phrase properly
 | 
			
		||||
            if (!xxx.is_human(parent.pawn) || !xxx.is_human(cummer) || parent.pawn == cummer) return;
 | 
			
		||||
            if (parent.pawn.CurJobDef != xxx.casual_sex && parent.pawn.CurJobDef != xxx.gettin_loved) return;
 | 
			
		||||
            if (!(parent.pawn.IsColonist || parent.pawn.IsPrisonerOfColony) && !(cummer.IsColonist || cummer.IsPrisonerOfColony)) return;
 | 
			
		||||
            if (!xxx.is_human(Pawn) || !xxx.is_human(cummer) || Pawn == cummer) return;
 | 
			
		||||
            if (Pawn.CurJobDef != xxx.casual_sex && Pawn.CurJobDef != xxx.gettin_loved) return;
 | 
			
		||||
            if (!(Pawn.IsColonist || Pawn.IsPrisonerOfColony) && !(cummer.IsColonist || cummer.IsPrisonerOfColony)) return;
 | 
			
		||||
            if (!IsDangerDay) return;
 | 
			
		||||
            TaleRecorder.RecordTale(VariousDefOf.TaleCameInside, new object[] { cummer, parent.pawn });
 | 
			
		||||
            TaleRecorder.RecordTale(VariousDefOf.TaleCameInside, new object[] { cummer, Pawn });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected void GoNextStage(Stage nextstage, bool calculateHours = true)
 | 
			
		||||
| 
						 | 
				
			
			@ -1678,10 +1679,10 @@ 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);
 | 
			
		||||
            Hediff hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Climacteric);
 | 
			
		||||
            if (hediff != null) Pawn.health.RemoveHediff(hediff);
 | 
			
		||||
            hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Menopause);
 | 
			
		||||
            if (hediff != null) 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;
 | 
			
		||||
| 
						 | 
				
			
			@ -1712,10 +1713,10 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        protected float InterspeciesImplantFactor(Pawn fertilizer)
 | 
			
		||||
        {
 | 
			
		||||
            if (fertilizer.def.defName == parent.pawn.def.defName) return 1.0f;
 | 
			
		||||
            if (fertilizer.def.defName == Pawn.def.defName) return 1.0f;
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                if (RJWPregnancySettings.complex_interspecies) return SexUtility.BodySimilarity(parent.pawn, fertilizer);
 | 
			
		||||
                if (RJWPregnancySettings.complex_interspecies) return SexUtility.BodySimilarity(Pawn, fertilizer);
 | 
			
		||||
                else return RJWPregnancySettings.interspecies_impregnation_modifier;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,7 +51,7 @@ namespace RJW_Menstruation
 | 
			
		|||
                "eggs: " + comp.GetNumofEggs + "\n";
 | 
			
		||||
            }
 | 
			
		||||
            else description += comp.GetCurStageLabel + "\n";
 | 
			
		||||
            if (pawn.IsPregnant())
 | 
			
		||||
            if (pawn.IsRJWPregnant())
 | 
			
		||||
            {
 | 
			
		||||
                Hediff_BasePregnancy hediff = comp.Pregnancy;
 | 
			
		||||
                if (hediff != null && Utility.ShowFetusImage(hediff))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,10 +57,9 @@ namespace RJW_Menstruation
 | 
			
		|||
            if (__state == null || __state.Pregnancy != null) return;
 | 
			
		||||
            // It was pregnant, but not anymore. This probably means the pregnancy was destroyed by e.g. a mech implant
 | 
			
		||||
            Pawn pawn = props.partner;
 | 
			
		||||
            Hediff_BasePregnancy newestPregnancy = pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().MaxBy(hediff => hediff.loadID);
 | 
			
		||||
            if (newestPregnancy == null) return;
 | 
			
		||||
            Hediff_BasePregnancy newestPregnancy = pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().MaxByWithFallback(hediff => hediff.loadID);
 | 
			
		||||
 | 
			
		||||
            if (pawn.GetMenstruationComps().Any(comp => comp.Pregnancy == newestPregnancy)) return; // One of the wombs did get it
 | 
			
		||||
            if (newestPregnancy == null || pawn.GetMenstruationComps().Any(comp => comp.Pregnancy == newestPregnancy)) return; // One of the wombs did get it
 | 
			
		||||
            else __state.Pregnancy = newestPregnancy;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -135,15 +135,19 @@ namespace RJW_Menstruation
 | 
			
		|||
            else return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static bool IsRJWPregnant(this Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            return pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().Any();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static float GetFarthestPregnancyProgress(this Pawn pawn)
 | 
			
		||||
        {
 | 
			
		||||
            return pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().MaxBy(hediff => hediff.GestationProgress)?.GestationProgress ?? -1;
 | 
			
		||||
            return pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().MaxByWithFallback(hediff => hediff.GestationProgress)?.GestationProgress ?? 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static float GetPregnancyProgress(this HediffComp_Menstruation comp)
 | 
			
		||||
        {
 | 
			
		||||
            if (comp.Pregnancy == null) return -1;
 | 
			
		||||
            if (comp.Pregnancy == null) return 0;
 | 
			
		||||
            else return comp.Pregnancy.GestationProgress;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@ namespace RJW_Menstruation.Sexperience
 | 
			
		|||
        [HarmonyPatch("HasJobOnThing")]
 | 
			
		||||
        public static bool HasJobOnThing(Pawn pawn, ref bool __result)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn.GetMenstruationComps().Any(comp => comp.DoCleanWomb && comp.TotalCumPercent > 0.001f) && pawn.Map.listerBuildings.ColonistsHaveBuilding(VariousDefOf.CumBucket))
 | 
			
		||||
            if (pawn.GetMenstruationComps().Any(comp => comp.DoCleanWomb && comp.TotalCumPercent > 0.001f) && (pawn.Map?.listerBuildings.ColonistsHaveBuilding(VariousDefOf.CumBucket) ?? false))
 | 
			
		||||
            {
 | 
			
		||||
                __result = true;
 | 
			
		||||
                return false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
			
		||||
<Manifest>
 | 
			
		||||
	<identifier>RJW Menstruation</identifier>
 | 
			
		||||
	<version>1.0.7.1</version>
 | 
			
		||||
	<version>1.0.7.2</version>
 | 
			
		||||
	<dependencies>
 | 
			
		||||
	</dependencies>
 | 
			
		||||
	<incompatibleWith />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Version 1.0.7.2
 | 
			
		||||
 - Fix errors when trying to open dev actions when HAR is not installed
 | 
			
		||||
 - Fix "error processing breasts" for pawns with vanilla pregnancy (e.g. animals)
 | 
			
		||||
 - Removing a vagina won't end a mechanoid implant anymore.
 | 
			
		||||
 | 
			
		||||
Version 1.0.7.1
 | 
			
		||||
 - Null reference error fix for multiple wombs when one is pregnant.
 | 
			
		||||
 - Fix the progress bar on pregnancy again. Also make undiscovered pregnancies a little more subtle.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue