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
						c56e275a92
					
				
					 13 changed files with 72 additions and 69 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -11,27 +11,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<Patch>
 | 
					<Patch>
 | 
				
			||||||
	<Operation Class="PatchOperationAdd">
 | 
						<Operation Class="PatchOperationAdd">
 | 
				
			||||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="DogVagina"]</xpath>
 | 
					 | 
				
			||||||
		<value>
 | 
					 | 
				
			||||||
			<comps>
 | 
					 | 
				
			||||||
				<li Class="RJW_Menstruation.CompProperties_Menstruation">
 | 
					 | 
				
			||||||
					<maxCumCapacity>8</maxCumCapacity>
 | 
					 | 
				
			||||||
					<baseImplantationChanceFactor>1.0</baseImplantationChanceFactor>
 | 
					 | 
				
			||||||
					<basefertilizationChanceFactor>1.0</basefertilizationChanceFactor>
 | 
					 | 
				
			||||||
					<follicularIntervalDays>14</follicularIntervalDays>
 | 
					 | 
				
			||||||
					<lutealIntervalDays>166</lutealIntervalDays>
 | 
					 | 
				
			||||||
					<bleedingIntervalDays>8</bleedingIntervalDays>
 | 
					 | 
				
			||||||
					<recoveryIntervalDays>15</recoveryIntervalDays>
 | 
					 | 
				
			||||||
					<eggLifespanDays>4</eggLifespanDays>
 | 
					 | 
				
			||||||
					<wombTex>Womb/Womb</wombTex>
 | 
					 | 
				
			||||||
					<vagTex>Genitals/Vagina</vagTex>
 | 
					 | 
				
			||||||
					<estrusDaysBeforeOvulation>9</estrusDaysBeforeOvulation>
 | 
					 | 
				
			||||||
				</li>
 | 
					 | 
				
			||||||
			</comps>
 | 
					 | 
				
			||||||
		</value>
 | 
					 | 
				
			||||||
	</Operation>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	<!--<Operation Class="PatchOperationAdd">
 | 
					 | 
				
			||||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="DogVagina"]</xpath>
 | 
							<xpath>/Defs/rjw.HediffDef_PartBase[defName="DogVagina"]</xpath>
 | 
				
			||||||
		<value>
 | 
							<value>
 | 
				
			||||||
			<comps>
 | 
								<comps>
 | 
				
			||||||
| 
						 | 
					@ -51,7 +30,7 @@
 | 
				
			||||||
				</li>
 | 
									</li>
 | 
				
			||||||
			</comps>
 | 
								</comps>
 | 
				
			||||||
		</value>
 | 
							</value>
 | 
				
			||||||
	</Operation>-->
 | 
						</Operation>
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	<Operation Class="PatchOperationAdd">
 | 
						<Operation Class="PatchOperationAdd">
 | 
				
			||||||
		<xpath>/Defs/rjw.HediffDef_PartBase[defName="CatVagina"]</xpath>
 | 
							<xpath>/Defs/rjw.HediffDef_PartBase[defName="CatVagina"]</xpath>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,10 +28,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (filth != null)
 | 
					                filth?.AddSources(sources);
 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    filth.AddSources(sources);
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (filth != null)
 | 
					            if (filth != null)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -75,7 +75,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                    case Stage.Ovulatory:
 | 
					                    case Stage.Ovulatory:
 | 
				
			||||||
                        return true;
 | 
					                        return true;
 | 
				
			||||||
                    case Stage.Luteal:
 | 
					                    case Stage.Luteal:
 | 
				
			||||||
                        return IsEggExist && curStageHrs < EggLifespanHours * 24;
 | 
					                        return IsEggExist && curStageHrs < EggLifespanHours;
 | 
				
			||||||
                    default:
 | 
					                    default:
 | 
				
			||||||
                        return false;
 | 
					                        return false;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					@ -93,7 +93,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                case Stage.Ovulatory:
 | 
					                case Stage.Ovulatory:
 | 
				
			||||||
                    return true;
 | 
					                    return true;
 | 
				
			||||||
                case Stage.Luteal:
 | 
					                case Stage.Luteal:
 | 
				
			||||||
                    return IsEggExist && curStageHrs < EggLifespanHours * 24;
 | 
					                    return IsEggExist && curStageHrs < EggLifespanHours;
 | 
				
			||||||
                default:
 | 
					                default:
 | 
				
			||||||
                    return false;
 | 
					                    return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -498,7 +498,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                    case Stage.Ovulatory:
 | 
					                    case Stage.Ovulatory:
 | 
				
			||||||
                        return true;
 | 
					                        return true;
 | 
				
			||||||
                    case Stage.Luteal:
 | 
					                    case Stage.Luteal:
 | 
				
			||||||
                        return curStageHrs < EggLifespanHours * 24;
 | 
					                        return curStageHrs < EggLifespanHours;
 | 
				
			||||||
                    default:
 | 
					                    default:
 | 
				
			||||||
                        return false;
 | 
					                        return false;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					@ -744,6 +744,38 @@ namespace RJW_Menstruation
 | 
				
			||||||
            base.CompPostPostRemoved();
 | 
					            base.CompPostPostRemoved();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public override string CompTipStringExtra
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                StringBuilder tip = new StringBuilder();
 | 
				
			||||||
 | 
					                tip.Append(Translations.Dialog_WombInfo01);
 | 
				
			||||||
 | 
					                tip.Append(": ");
 | 
				
			||||||
 | 
					                tip.Append(GetCurStageLabel);
 | 
				
			||||||
 | 
					                string fertInfo = GetFertilizingInfo;
 | 
				
			||||||
 | 
					                if(CurrentVisibleStage == Stage.Luteal && fertInfo.Length > 0)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    tip.AppendLine();
 | 
				
			||||||
 | 
					                    tip.Append(fertInfo);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                return tip.ToString();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        protected virtual int HoursToNextStage()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return Math.Max(0,(currentIntervalHours - curStageHrs) / Configurations.CycleAcceleration);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public override string CompDebugString()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (curStage == Stage.None || curStage == Stage.Infertile || curStage == Stage.Pregnant) return base.CompDebugString();
 | 
				
			||||||
 | 
					            StringBuilder debugString = new StringBuilder();
 | 
				
			||||||
 | 
					            debugString.Append($"Time to next state: ");
 | 
				
			||||||
 | 
					            debugString.Append(GenDate.ToStringTicksToPeriod(HoursToNextStage() * GenDate.TicksPerHour));
 | 
				
			||||||
 | 
					            return debugString.ToString();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// Get fluid in womb that not a cum
 | 
					        /// Get fluid in womb that not a cum
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
| 
						 | 
					@ -1200,7 +1232,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                case Stage.Ovulatory:
 | 
					                case Stage.Ovulatory:
 | 
				
			||||||
                    return true;
 | 
					                    return true;
 | 
				
			||||||
                case Stage.Luteal:
 | 
					                case Stage.Luteal:
 | 
				
			||||||
                    return curStageHrs < EggLifespanHours * 24;
 | 
					                    return curStageHrs < EggLifespanHours;
 | 
				
			||||||
                default:
 | 
					                default:
 | 
				
			||||||
                    return false;
 | 
					                    return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -1531,7 +1563,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
            ovulated = (int)eggnum + eggstack;
 | 
					            ovulated = (int)eggnum + eggstack;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for (int i = 0; i < ovulated; i++)
 | 
					            for (int i = 0; i < ovulated; i++)
 | 
				
			||||||
                eggs.Add(new Egg((int)(EggLifespanHours * 24 / CycleFactor)));
 | 
					                eggs.Add(new Egg((int)(EggLifespanHours / CycleFactor)));
 | 
				
			||||||
            ovarypower -= ovulated;
 | 
					            ovarypower -= ovulated;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            eggstack = 0;
 | 
					            eggstack = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,6 +57,12 @@ namespace RJW_Menstruation
 | 
				
			||||||
            Scribe_Values.Look(ref averageCycleIntervalHours, "averageCycleIntervalHours", averageCycleIntervalHours, true);
 | 
					            Scribe_Values.Look(ref averageCycleIntervalHours, "averageCycleIntervalHours", averageCycleIntervalHours, true);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        protected override int HoursToNextStage()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (curStage == Stage.Anestrus &&  hoursToNextCycle > 0) return hoursToNextCycle / Configurations.CycleAcceleration;
 | 
				
			||||||
 | 
					            else return base.HoursToNextStage();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        protected override void BleedingAction()
 | 
					        protected override void BleedingAction()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (curStageHrs >= currentIntervalHours)
 | 
					            if (curStageHrs >= currentIntervalHours)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -79,6 +79,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                    kind: babyPawnKind,
 | 
					                    kind: babyPawnKind,
 | 
				
			||||||
                    faction: mother.Faction,
 | 
					                    faction: mother.Faction,
 | 
				
			||||||
                    allowDowned: true,
 | 
					                    allowDowned: true,
 | 
				
			||||||
 | 
					                    // fixedLastName seems not to actually do anything, as we eventually end up in PawnBioAndNameGenerator.NameResolvedFrom, which ignores its forcedLastName argument
 | 
				
			||||||
                    fixedLastName: (string)RandomLastName.Invoke(null, new object[] { mother, mother, xxx.is_human(father) ? father : null }),
 | 
					                    fixedLastName: (string)RandomLastName.Invoke(null, new object[] { mother, mother, xxx.is_human(father) ? father : null }),
 | 
				
			||||||
                    forceNoIdeo: true,
 | 
					                    forceNoIdeo: true,
 | 
				
			||||||
                    forcedEndogenes: PregnancyUtility.GetInheritedGenes(father, mother),
 | 
					                    forcedEndogenes: PregnancyUtility.GetInheritedGenes(father, mother),
 | 
				
			||||||
| 
						 | 
					@ -207,8 +208,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                    do
 | 
					                    do
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        Pawn baby = comp.babies[0];
 | 
					                        Pawn baby = comp.babies[0];
 | 
				
			||||||
                        Pawn thisFather = baby.GetFather();
 | 
					                        Pawn thisFather = baby.GetFather() ?? father;
 | 
				
			||||||
                        if (thisFather == null) thisFather = father;
 | 
					 | 
				
			||||||
                        baby.relations.ClearAllRelations();   // To keep ApplyBirthOutcome from erroring when it tries to set up relations
 | 
					                        baby.relations.ClearAllRelations();   // To keep ApplyBirthOutcome from erroring when it tries to set up relations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        PregnancyUtility.ApplyBirthOutcome(thisOutcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments);
 | 
					                        PregnancyUtility.ApplyBirthOutcome(thisOutcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments);
 | 
				
			||||||
| 
						 | 
					@ -258,8 +258,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                    do
 | 
					                    do
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        Pawn baby = comp.babies[0];
 | 
					                        Pawn baby = comp.babies[0];
 | 
				
			||||||
                        Pawn thisFather = baby.GetFather();
 | 
					                        Pawn thisFather = baby.GetFather() ?? father;
 | 
				
			||||||
                        if (thisFather == null) thisFather = father;
 | 
					 | 
				
			||||||
                        baby.relations.ClearAllRelations();
 | 
					                        baby.relations.ClearAllRelations();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        PregnancyUtility.ApplyBirthOutcome(outcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments);
 | 
					                        PregnancyUtility.ApplyBirthOutcome(outcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -151,10 +151,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
            else if (gestationProgress < 0.8f) icon = fetustex + "04";
 | 
					            else if (gestationProgress < 0.8f) icon = fetustex + "04";
 | 
				
			||||||
            else icon = fetustex + "05";
 | 
					            else icon = fetustex + "05";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            Texture2D result = TryGetTwinsIcon(icon, babycount);
 | 
					            return TryGetTwinsIcon(icon, babycount) ?? ContentFinder<Texture2D>.Get((icon), true);
 | 
				
			||||||
 | 
					 | 
				
			||||||
            if (result == null) result = ContentFinder<Texture2D>.Get((icon), true);
 | 
					 | 
				
			||||||
            return result;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static Texture2D TryGetTwinsIcon(string path, int babycount)
 | 
					        public static Texture2D TryGetTwinsIcon(string path, int babycount)
 | 
				
			||||||
| 
						 | 
					@ -205,10 +202,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                if (hediffs.Count == 1) return ContentFinder<Texture2D>.Get(path + "Womb_Egged_Large", true);
 | 
					                if (hediffs.Count == 1) return ContentFinder<Texture2D>.Get(path + "Womb_Egged_Large", true);
 | 
				
			||||||
                else return ContentFinder<Texture2D>.Get(path + "Womb_Egged_ManyMixed", true);
 | 
					                else return ContentFinder<Texture2D>.Get(path + "Womb_Egged_ManyMixed", true);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            Texture2D result = ContentFinder<Texture2D>.Get(path + "Womb_Egged_" + hediffs.Count(), false);
 | 
					            return ContentFinder<Texture2D>.Get(path + "Womb_Egged_" + hediffs.Count(), false) ?? ContentFinder<Texture2D>.Get(path + "Womb_Egged_Many", true);
 | 
				
			||||||
            if (result == null) result = ContentFinder<Texture2D>.Get(path + "Womb_Egged_Many", true);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            return result;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        public static Texture2D GetWombIcon(this HediffComp_Menstruation comp)
 | 
					        public static Texture2D GetWombIcon(this HediffComp_Menstruation comp)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					@ -307,8 +301,8 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static Texture2D GetAnalIcon(this Pawn pawn, bool drawOrigin = false)
 | 
					        public static Texture2D GetAnalIcon(this Pawn pawn, bool drawOrigin = false)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def));
 | 
					            Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def)) ??
 | 
				
			||||||
            if (hediff == null) hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
 | 
					                Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
 | 
				
			||||||
            if (hediff == null) return ContentFinder<Texture2D>.Get(("Genitals/Anal00"), true);
 | 
					            if (hediff == null) return ContentFinder<Texture2D>.Get(("Genitals/Anal00"), true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            string icon;
 | 
					            string icon;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -150,8 +150,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
            if (Configurations.EnableBirthVaginaMorph)
 | 
					            if (Configurations.EnableBirthVaginaMorph)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                // The comp still has the pregnancy attached at this point in the process
 | 
					                // The comp still has the pregnancy attached at this point in the process
 | 
				
			||||||
                Hediff vagina = __instance.GetMenstruationCompFromPregnancy()?.parent;
 | 
					                Hediff vagina = (__instance.GetMenstruationCompFromPregnancy()?.parent) ?? mother.health.hediffSet.hediffs.FirstOrFallback(x => VariousDefOf.AllVaginas.Contains(x.def));
 | 
				
			||||||
                if (vagina == null) vagina = mother.health.hediffSet.hediffs.FirstOrFallback(x => VariousDefOf.AllVaginas.Contains(x.def));
 | 
					 | 
				
			||||||
                if (vagina == null) return;
 | 
					                if (vagina == null) return;
 | 
				
			||||||
                float morph = Mathf.Max(baby.BodySize - Mathf.Pow(vagina.Severity * mother.BodySize, 2), 0f);
 | 
					                float morph = Mathf.Max(baby.BodySize - Mathf.Pow(vagina.Severity * mother.BodySize, 2), 0f);
 | 
				
			||||||
                vagina.Severity += morph * Configurations.VaginaMorphPower;
 | 
					                vagina.Severity += morph * Configurations.VaginaMorphPower;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,20 +37,14 @@ namespace RJW_Menstruation
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            BindingFlags flags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
 | 
					            BindingFlags flags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
 | 
				
			||||||
            FieldInfo fieldInfo = type?.GetField(name, flags);
 | 
					            FieldInfo fieldInfo = type?.GetField(name, flags);
 | 
				
			||||||
            if (fieldInfo != null)
 | 
					            fieldInfo?.SetValue(null, value);
 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                fieldInfo.SetValue(null, value);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static void SetMemberValue(this object obj, string name, object value)
 | 
					        public static void SetMemberValue(this object obj, string name, object value)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            BindingFlags flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
 | 
					            BindingFlags flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
 | 
				
			||||||
            FieldInfo fieldInfo = obj?.GetType().GetField(name, flags);
 | 
					            FieldInfo fieldInfo = obj?.GetType().GetField(name, flags);
 | 
				
			||||||
            if (fieldInfo != null)
 | 
					            fieldInfo?.SetValue(obj, value);
 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                fieldInfo.SetValue(obj, value);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,12 +66,10 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static float GetCumVolume(this Pawn pawn, List<Hediff> hediffs)
 | 
					        public static float GetCumVolume(this Pawn pawn, List<Hediff> hediffs)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            CompHediffBodyPart part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("penis")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
 | 
					            CompHediffBodyPart part = (((hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("penis")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>()) ??
 | 
				
			||||||
            if (part == null) part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorf")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
 | 
					                (hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorf")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>())) ??
 | 
				
			||||||
            if (part == null) part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorm")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
 | 
					                (hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorm")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>())) ??
 | 
				
			||||||
            if (part == null) part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("tentacle")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
 | 
					                (hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("tentacle")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>());
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            return pawn.GetCumVolume(part);
 | 
					            return pawn.GetCumVolume(part);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -194,9 +192,8 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static void DrawBreastIcon(this Pawn pawn, Rect rect)
 | 
					        public static void DrawBreastIcon(this Pawn pawn, Rect rect)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_breastsBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
 | 
					            Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_breastsBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def)) ??
 | 
				
			||||||
            if (hediff == null)
 | 
					                Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_uddersBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
 | 
				
			||||||
                hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_uddersBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
 | 
					 | 
				
			||||||
            Texture2D breast, nipple, areola;
 | 
					            Texture2D breast, nipple, areola;
 | 
				
			||||||
            if (hediff != null)
 | 
					            if (hediff != null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
| 
						 | 
					@ -359,15 +356,15 @@ namespace RJW_Menstruation
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        public static string GetAnusLabel(this Pawn pawn)
 | 
					        public static string GetAnusLabel(this Pawn pawn)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def));
 | 
					            Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def)) ??
 | 
				
			||||||
            if (hediff == null) hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
 | 
					                Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
 | 
				
			||||||
            if (hediff != null) return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")";
 | 
					            if (hediff != null) return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")";
 | 
				
			||||||
            else return "";
 | 
					            else return "";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        public static string GetBreastLabel(this Pawn pawn)
 | 
					        public static string GetBreastLabel(this Pawn pawn)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_breastsBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
 | 
					            Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_breastsBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def)) ??
 | 
				
			||||||
            if (hediff == null) hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_uddersBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
 | 
					                Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_uddersBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllBreasts.Contains(h.def));
 | 
				
			||||||
            if (hediff != null) return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")";
 | 
					            if (hediff != null) return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")";
 | 
				
			||||||
            else return "";
 | 
					            else return "";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
					<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
				
			||||||
<Manifest>
 | 
					<Manifest>
 | 
				
			||||||
	<identifier>RJW Menstruation</identifier>
 | 
						<identifier>RJW Menstruation</identifier>
 | 
				
			||||||
	<version>1.0.8.6</version>
 | 
						<version>1.0.8.7</version>
 | 
				
			||||||
	<dependencies>
 | 
						<dependencies>
 | 
				
			||||||
	</dependencies>
 | 
						</dependencies>
 | 
				
			||||||
	<incompatibleWith />
 | 
						<incompatibleWith />
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,9 @@
 | 
				
			||||||
 | 
					Version 1.0.8.7
 | 
				
			||||||
 | 
					 - Fix missing texture when using Milkable Colonists.
 | 
				
			||||||
 | 
					 - Fix estrus and egg lifespan lasting far longer than intended.
 | 
				
			||||||
 | 
					 - Canine vaginas now use the new periodic ovulator cycle.
 | 
				
			||||||
 | 
					 - Hovering over a vagina hediff will show the current state in the tooltip.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Version 1.0.8.6
 | 
					Version 1.0.8.6
 | 
				
			||||||
 - Updated Traditional Chinese translation by Hydrogen.
 | 
					 - Updated Traditional Chinese translation by Hydrogen.
 | 
				
			||||||
 - Fix error when trying to terminate a non-Biotech pregnancy.
 | 
					 - Fix error when trying to terminate a non-Biotech pregnancy.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue