diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index ce5f760..2ac459a 100644 Binary files a/1.4/Assemblies/RJW_Menstruation.dll and b/1.4/Assemblies/RJW_Menstruation.dll differ diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Cum.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Cum.cs index 6afa95d..3f112d3 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Cum.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Cum.cs @@ -204,8 +204,9 @@ namespace RJW_Menstruation { // comp is used for Hydrogen's RJW Muscle Injury float totalleak = volume; - float decayPerInterval = 1 - Mathf.Pow(1 - Configurations.CumDecayRatio, (float)comp.TickInterval / GenDate.TicksPerHour); - float fertilityDecayPerInterval = 1 - Mathf.Pow(1 - Configurations.CumFertilityDecayRatio, (float)comp.TickInterval / GenDate.TicksPerHour); + float decayPerInterval = 1 - Mathf.Pow(1 - Configurations.CumDecayRatio, comp.SimulationsPerHour); + float fertilityDecayPerInterval = 1 - Mathf.Pow(1 - Configurations.CumFertilityDecayRatio, comp.SimulationsPerHour); + antisperm *= comp.SimulationsPerHour; volume *= Math.Max(0, 1 - decayPerInterval * (1 - DecayResist) * leakfactor); fertility *= Math.Max(0, 1 - (fertilityDecayPerInterval * (1 - DecayResist) + antisperm)); CutMinor(); diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/DebugActions.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/DebugActions.cs index fe98f5a..55f34db 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/DebugActions.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/DebugActions.cs @@ -10,7 +10,10 @@ namespace RJW_Menstruation private static void SetFollicular(Pawn p) { foreach (HediffComp_Menstruation comp in p.GetMenstruationComps()) + { comp.GoNextStage(HediffComp_Menstruation.Stage.Follicular); + comp.RemoveAllEggs(); + } Messages.Message($"{p} is now follicular", p, MessageTypeDefOf.NeutralEvent, false); } @@ -34,7 +37,10 @@ namespace RJW_Menstruation private static void SetBleeding(Pawn p) { foreach (HediffComp_Menstruation comp in p.GetMenstruationComps()) + { comp.GoNextStage(HediffComp_Menstruation.Stage.Bleeding); + comp.RemoveAllEggs(); + } Messages.Message($"{p} is now bleeding", p, MessageTypeDefOf.NeutralEvent, false); } /* @@ -57,6 +63,13 @@ namespace RJW_Menstruation comp.RemoveAllCums(); Messages.Message($"All cum removed from {p}'s womb", p, MessageTypeDefOf.NeutralEvent, false); } + [DebugAction("RJW Menstruation", "Remove all eggs from pawn's womb", false, false, actionType = DebugActionType.ToolMapForPawns, allowedGameStates = AllowedGameStates.Playing)] + private static void RemoveEggs(Pawn p) + { + foreach (HediffComp_Menstruation comp in p.GetMenstruationComps()) + comp.RemoveAllEggs(); + Messages.Message($"All eggs removed from {p}'s womb", p, MessageTypeDefOf.NeutralEvent, false); + } [DebugAction("RJW Menstruation", "Add egg to pawn's next ovulation", false, false, actionType = DebugActionType.ToolMapForPawns, allowedGameStates = AllowedGameStates.Playing)] private static void AddEgg(Pawn p) { diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/DrugOutcomeDoers.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/DrugOutcomeDoers.cs index 0cbbf40..b618abe 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/DrugOutcomeDoers.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/DrugOutcomeDoers.cs @@ -89,7 +89,7 @@ namespace RJW_Menstruation else m.moodPowerFactor = 0.3f; } - if (pawn.WantsToGetPregnant()) pawn.needs.mood.thoughts.memories.TryGainMemoryFast(VariousDefOf.HateTookContraceptivePill); + if (pawn.IsProPregnancy()) pawn.needs.mood.thoughts.memories.TryGainMemoryFast(VariousDefOf.HateTookContraceptivePill); else pawn.needs.mood.thoughts.memories.TryGainMemoryFast(VariousDefOf.TookContraceptivePill); } } diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs index 5bb48b7..558031d 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs @@ -75,9 +75,6 @@ namespace RJW_Menstruation if (babyHalfAge <= 0) babyHalfAge = 1.2f / 2; // Default to human - if (RJWPregnancySettings.phantasy_pregnancy) - babyHalfAge /= GenDate.DaysPerYear; - return babyHalfAge; } } @@ -140,10 +137,10 @@ namespace RJW_Menstruation { base.CompExposeData(); - Scribe_Values.Look(ref ageOfLastBirth, "ageOfLastBirth", ageOfLastBirth, true); + Scribe_Values.Look(ref ageOfLastBirth, "ageOfLastBirth", -1); Scribe_Values.Look(ref maxBreastIncrement, "maxBreastIncrement", maxBreastIncrement, true); - Scribe_Values.Look(ref breastSizeIncreased, "breastSizeIncreased", breastSizeIncreased, true); - Scribe_Values.Look(ref nippleProgress, "nippleProgress", nippleProgress, true); + Scribe_Values.Look(ref breastSizeIncreased, "breastSizeIncreased", 0.0f); + Scribe_Values.Look(ref nippleProgress, "nippleProgress", 0.0f); Scribe_Values.Look(ref baseAlpha, "baseAlpha", baseAlpha, true); Scribe_Values.Look(ref baseAreola, "baseAreola", baseAreola, true); Scribe_Values.Look(ref baseNipple, "baseNipple", baseNipple, true); @@ -199,19 +196,19 @@ namespace RJW_Menstruation protected long CalculateLastBirth() { - long youngestAge = (long)(BabyHalfAge * GenDate.TicksPerYear) * -2; // So a newborn isn't considered a new mother, either + long youngestAge = -1; if ((Pawn.relations == null)) return youngestAge; - List pregnancies = new List(); - Pawn.health.hediffSet.GetHediffs(ref pregnancies); + List rjwPregnancies = new List(); + Pawn.health.hediffSet.GetHediffs(ref rjwPregnancies); bool hasChild = Pawn.relations.Children. - Where(child => !pregnancies.Any(preg => preg.babies.Contains(child))). // no fetuses + Where(child => !rjwPregnancies.Any(preg => preg.babies.Contains(child))). // no fetuses Where(child => child.GetMother() == Pawn). // not Dad TryMinBy(child => child.ageTracker.AgeBiologicalTicks, out Pawn youngest); - if (hasChild) youngestAge = Pawn.ageTracker.AgeBiologicalTicks - youngest.ageTracker.AgeBiologicalTicks; + if (hasChild) youngestAge = Math.Max(Pawn.ageTracker.AgeBiologicalTicks - youngest.ageTracker.AgeBiologicalTicks, -1); return youngestAge; } @@ -224,7 +221,7 @@ namespace RJW_Menstruation { maxBreastIncrement = Utility.RandGaussianLike(0.088f, 0.202f); } - if (ageOfLastBirth == 0) + if (ageOfLastBirth == 0 || ageOfLastBirth < -1) { ageOfLastBirth = CalculateLastBirth(); } @@ -253,7 +250,7 @@ namespace RJW_Menstruation debugGrowthStatus = "Base size (ageless)"; } // The youngest child is less than halfway into babyhood: Full size - else if (ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > Pawn.ageTracker.AgeBiologicalTicks) + else if (ageOfLastBirth > 0 && ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > Pawn.ageTracker.AgeBiologicalTicks) { debugGrowthStatus = "Full size due to young child"; if (breastSizeIncreased < MaxBreastIncrement) @@ -299,7 +296,7 @@ namespace RJW_Menstruation float newNippleProgress; if (Pawn.ageTracker.BiologicalTicksPerTick <= 0f) newNippleProgress = 0f; - else if (ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > Pawn.ageTracker.AgeBiologicalTicks) + else if (ageOfLastBirth > 0 && ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > Pawn.ageTracker.AgeBiologicalTicks) newNippleProgress = 1f; else if (Pawn.IsRJWPregnant() || Pawn.IsBiotechPregnant()) newNippleProgress = nippleTransitions.Evaluate(Pawn.GetFarthestPregnancyProgress()); diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index 2745e80..c32ee83 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -160,7 +160,7 @@ namespace RJW_Menstruation new CurvePoint(1.0f,0.5f) }; - public int TickInterval + protected int TickInterval { get { @@ -169,13 +169,15 @@ namespace RJW_Menstruation if (Pawn.IsAnimal()) tickInterval = Configurations.AnimalTickInterval; else if (Pawn.IsColonist || Pawn.IsPrisonerOfColony || Pawn.IsSlaveOfColony) tickInterval = Configurations.ColonistTickInterval; else tickInterval = Configurations.NonColonistTickInterval; - if (tickInterval <= 0) tickInterval = 1; + if (tickInterval <= Configurations.TickIntervalMinimum) tickInterval = Configurations.TickIntervalMinimum; } return tickInterval; } set => tickInterval = value; } + public float SimulationsPerHour => (float)TickInterval / GenDate.TicksPerHour; + public Hediff Pregnancy { get { @@ -336,8 +338,7 @@ namespace RJW_Menstruation // Implant factor will be based solely on pawn age, plus any rollover from ovulation chance StatPart_FertilityByGenderAge fertilityStatPart = StatDefOf.Fertility.GetStatPart(); fertilityStatPart?.TransformValue(StatRequest.For(Pawn), ref factor); - float ovulationOverflow = OvulationChance; - if (ovulationOverflow > 1.0f) factor *= ovulationOverflow; + if (OvulationChance > 1.0f) factor *= OvulationChance; return Props.baseImplantationChanceFactor * FertilityModifier * factor; } else @@ -630,6 +631,15 @@ namespace RJW_Menstruation } } + public float StageProgessNextUpdate + { + get + { + if (pregnancy != null) return StageProgress; + return Mathf.Clamp01((float)(curStageTicks + TickInterval * Configurations.CycleAcceleration) / currentIntervalTicks); + } + } + public Texture2D GetStageTexture { get @@ -1051,9 +1061,9 @@ namespace RJW_Menstruation if (Pawn.CurJobDef == xxx.knotted) leakfactor = 0f; foreach (Cum cum in cums) { - if (Rand.Chance((float)TickInterval / GenDate.TicksPerHour)) cum.CumEffects(Pawn); + if (Rand.Chance(SimulationsPerHour)) cum.CumEffects(Pawn); float vd = cum.DismishNatural(leakfactor, this, antisperm); - cum.MakeThinner((float)Configurations.CycleAcceleration * TickInterval / GenDate.TicksPerHour); + cum.MakeThinner((float)Configurations.CycleAcceleration * SimulationsPerHour); totalleak += AbsorbCum(vd, absorber); string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString()); filthlabels.Add(tmp.Replace(" x1", "")); @@ -1135,6 +1145,11 @@ namespace RJW_Menstruation cums.Clear(); } + public void RemoveAllEggs() + { + eggs.Clear(); + } + /// /// Fertilize eggs and return the result @@ -1353,7 +1368,7 @@ namespace RJW_Menstruation //float fertFailChancePerHour = Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor); //float fertFailChancePerInterval = Mathf.Pow(fertFailChancePerHour, (float)TickInterval / GenDate.TicksPerHour); - float fertFailChancePerInterval = Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor * TickInterval / GenDate.TicksPerHour); + float fertFailChancePerInterval = Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor * SimulationsPerHour); if (Rand.Chance(fertFailChancePerInterval)) return null; @@ -1496,7 +1511,7 @@ namespace RJW_Menstruation protected void BleedOut() { // ~1.5 per hour times acceleration - float bledAmount = 0.03f * Configurations.BleedingAmount * Configurations.CycleAcceleration * Rand.Range(0.5f, 1.5f) * TickInterval / GenDate.TicksPerHour; + float bledAmount = 0.03f * Configurations.BleedingAmount * Configurations.CycleAcceleration * Rand.Range(0.5f, 1.5f) * SimulationsPerHour; CumIn(Pawn, bledAmount, Translations.Menstrual_Blood, -5.0f, Pawn.RaceProps?.BloodDef ?? ThingDefOf.Filth_Blood); Cum blood = GetNotCum(Translations.Menstrual_Blood); if (blood != null) blood.Color = BloodColor; @@ -1633,10 +1648,9 @@ namespace RJW_Menstruation eggnum *= ovulationFactor; int toOvulate = (int)eggnum + eggstack; - float ovulationChance = OvulationChance; int ovulated = 0; for (int i = 0; i < toOvulate; i++) - if (i < eggstack || Rand.Chance(ovulationChance)) // eggstack comes from drugs and are guaranteed ovulated + if (i < eggstack || Rand.Chance(OvulationChance)) // eggstack comes from drugs and are guaranteed ovulated { eggs.Add(new Egg((int)(EggLifespanTicks / CycleFactor))); ++ovulated; @@ -1644,7 +1658,7 @@ namespace RJW_Menstruation ovarypower -= ovulated; eggstack = 0; if (Configurations.Debug && ovulated != toOvulate) - Log.Message($"{Pawn} ovulated {ovulated}/{toOvulate} eggs ({ovulationChance.ToStringPercent()} chance)"); + Log.Message($"{Pawn} ovulated {ovulated}/{toOvulate} eggs ({OvulationChance.ToStringPercent()} chance)"); GoNextStage(Stage.Luteal); } @@ -1783,8 +1797,7 @@ namespace RJW_Menstruation if (!xxx.is_human(Pawn) || !xxx.is_human(cummer)) return; if ((cummer.HasQuirk(QuirkUtility.Quirks.Teratophile) != (Pawn.GetStatValue(StatDefOf.PawnBeauty) >= 0)) || - cummer.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || - cummer.HasQuirk(QuirkUtility.Quirks.Breeder)) + cummer.IsProPregnancy()) { if (cummer.relations.OpinionOf(Pawn) <= -25) { @@ -1798,7 +1811,7 @@ namespace RJW_Menstruation if (IsDangerDay) { - if (Pawn.WantsToGetPregnant()) + if (Pawn.IsProPregnancy()) { Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetish, cummer); } @@ -1821,7 +1834,7 @@ namespace RJW_Menstruation } else { - if (Pawn.WantsToGetPregnant()) + if (Pawn.IsProPregnancy()) { Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetishSafe, cummer); } diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs index 247149c..017a6ed 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs @@ -79,15 +79,12 @@ namespace RJW_Menstruation protected override void BleedingAction() { - if (curStageTicks >= currentIntervalTicks) + base.BleedingAction(); + if (curStage != Stage.Bleeding) { - Hediff hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp); - if (hediff != null && !Pawn.GetMenstruationComps().Any(comp => comp != this && comp.curStage == Stage.Bleeding)) Pawn.health.RemoveHediff(hediff); estrusflag = false; GoNextStage(Stage.Anestrus); - return; } - else base.BleedingAction(); } protected override void PregnantAction() diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs index ab09dd3..c3cd7e4 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs @@ -3,6 +3,7 @@ using RimWorld.Planet; using rjw; using System; using System.Collections.Generic; +using System.Diagnostics.Eventing.Reader; using System.Linq; using UnityEngine; using Verse; @@ -217,35 +218,36 @@ namespace RJW_Menstruation return wombtex; } + public static Texture2D GetOvaryIcon(this HediffComp_Menstruation comp) + { + const float ovaryChanceToShow_01 = 0.2f; + const float ovaryChanceToShow_02 = 0.8f; + float ovulatoryProgress; + bool isInduced = comp is HediffComp_InducedOvulator; + if (comp.curStage == HediffComp_Menstruation.Stage.Follicular && + isInduced && + comp.Pawn.jobs.curDriver is JobDriver_Sex job && + job.Sexprops != null && + !job.Sexprops.usedCondom && + (job.Sexprops.sexType == xxx.rjwSextype.Vaginal || job.Sexprops.sexType == xxx.rjwSextype.DoublePenetration)) + ovulatoryProgress = 0.0f; + else if (comp.curStage == HediffComp_Menstruation.Stage.Ovulatory) ovulatoryProgress = isInduced ? Mathf.Max(ovaryChanceToShow_01, comp.StageProgessNextUpdate) : comp.StageProgessNextUpdate; +// else if (comp.curStage == HediffComp_Menstruation.Stage.Luteal && comp.IsEggExist) return ContentFinder.Get("Ovaries/Ovary_02", true); + else return ContentFinder.Get("Womb/Empty", true); + + float combinedAppearance = ovulatoryProgress * comp.OvulationChance; + if (combinedAppearance >= ovaryChanceToShow_02 && comp.OvulationChance >= 1.0f) return ContentFinder.Get("Ovaries/Ovary_02", true); + else if (combinedAppearance >= ovaryChanceToShow_01) return ContentFinder.Get("Ovaries/Ovary_01", true); + else return ContentFinder.Get("Ovaries/Ovary_00", true); + } public static Texture2D GetEggIcon(this HediffComp_Menstruation comp, bool includeOvary) { - float ovulationChance = comp.OvulationChance; - const float ovaryChanceToShow_01 = 0.4f; - const float ovaryChanceToShow_02 = 1.0f; switch (comp.CurrentVisibleStage) { case HediffComp_Menstruation.Stage.Follicular: - if (!includeOvary) break; - if (comp is HediffComp_InducedOvulator) - { - if (comp.Pawn.jobs.curDriver is JobDriver_Sex job && - job.Sexprops != null && - !job.Sexprops.usedCondom && - (job.Sexprops.sexType == xxx.rjwSextype.Vaginal || job.Sexprops.sexType == xxx.rjwSextype.DoublePenetration)) - return ContentFinder.Get((ovulationChance >= ovaryChanceToShow_01) ? "Ovaries/Ovary_01" : "Ovaries/Ovary_00", true); - else break; - } - if (comp.curStageTicks > comp.CurStageIntervalTicks - 30 * GenDate.TicksPerHour) // Approximate time for ovulation to occur - return ContentFinder.Get((ovulationChance >= ovaryChanceToShow_01) ? "Ovaries/Ovary_01" : "Ovaries/Ovary_00", true); - else break; case HediffComp_Menstruation.Stage.Ovulatory: if (!includeOvary) break; - if (ovulationChance >= ovaryChanceToShow_02) - return ContentFinder.Get("Ovaries/Ovary_02", true); - else if (ovulationChance >= ovaryChanceToShow_01) - return ContentFinder.Get("Ovaries/Ovary_01", true); - else - return ContentFinder.Get("Ovaries/Ovary_00", true); + else return GetOvaryIcon(comp); case HediffComp_Menstruation.Stage.Luteal: if (!comp.IsEggExist) break; int fertTime = comp.EggFertilizedTime; @@ -256,6 +258,10 @@ namespace RJW_Menstruation else if (fertTime <= 54 * GenDate.TicksPerHour) return ContentFinder.Get("Eggs/Egg_Fertilized01", true); else return ContentFinder.Get("Eggs/Egg_Fertilized02", true); } + else if (includeOvary && comp.curStageTicks <= comp.Props.ovulationIntervalHours * 0.4f * GenDate.TicksPerHour) // Total about as long as it spent in Ovary_01 + { + return ContentFinder.Get("Ovaries/Ovary_02", true); + } else if (comp.IsEggFertilizing) { if (comp.GetFertilityChance() < 0.5f) @@ -401,7 +407,7 @@ namespace RJW_Menstruation return false; } - public static bool WantsToGetPregnant(this Pawn pawn) + public static bool IsProPregnancy(this Pawn pawn) { if (pawn.HasQuirk(QuirkUtility.Quirks.Breeder) || pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish)) diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs index f9ab88e..0b5d0c5 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs @@ -27,7 +27,7 @@ namespace RJW_Menstruation (pawn.relations?.DirectRelations?.Find(x => x.def.Equals(PawnRelationDefOf.Spouse) || x.def.Equals(PawnRelationDefOf.Fiance))) != null) return; - if (pawn.WantsToGetPregnant() || pawn.relations?.DirectRelations?.Find(x => x.def.Equals(PawnRelationDefOf.Lover)) != null) + if (pawn.IsProPregnancy() || pawn.relations?.DirectRelations?.Find(x => x.def.Equals(PawnRelationDefOf.Lover)) != null) { pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.UnwantedPregnancyMild); } diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Gizmo_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Gizmo_Patch.cs index 4571fae..86ef4d9 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Gizmo_Patch.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Gizmo_Patch.cs @@ -43,7 +43,7 @@ namespace RJW_Menstruation private static Gizmo CreateGizmo_WombStatus(Pawn pawn, HediffComp_Menstruation comp) { - Texture2D icon, icon_overay; + Texture2D icon, icon_overlay; StringBuilder description = new StringBuilder(); if (Configurations.Debug) { @@ -69,15 +69,15 @@ namespace RJW_Menstruation float gestationProgress = comp.StageProgress; if (hediff is Hediff_BasePregnancy || hediff is HediffWithParents) { - if (gestationProgress < 0.2f) icon_overay = comp.GetCumIcon(); - else icon_overay = ContentFinder.Get(("Womb/Empty"), true); + if (gestationProgress < 0.2f) icon_overlay = comp.GetCumIcon(); + else icon_overlay = ContentFinder.Get(("Womb/Empty"), true); } - else icon_overay = ContentFinder.Get(("Womb/Empty"), true); + else icon_overlay = ContentFinder.Get(("Womb/Empty"), true); } else { icon = comp.GetWombIcon(); - icon_overay = comp.GetCumIcon(); + icon_overlay = comp.GetCumIcon(); } } else @@ -91,7 +91,7 @@ namespace RJW_Menstruation { icon = comp.GetWombIcon(); } - icon_overay = comp.GetCumIcon(); + icon_overlay = comp.GetCumIcon(); } foreach (string s in comp.GetCumsInfo) description.AppendFormat("{0}\n", s); @@ -103,7 +103,7 @@ namespace RJW_Menstruation defaultLabel = pawn.LabelShort, defaultDesc = description.ToString(), icon = icon, - icon_overay = icon_overay, + icon_overlay = icon_overlay, shrinkable = Configurations.AllowShrinkIcon, cumcolor = c, comp = comp, diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs index 2c8b4c8..0448aac 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs @@ -462,8 +462,8 @@ namespace RJW_Menstruation statvalue = Configurations.ImplantationChance * comp.ImplantChance; float fertchance = comp.GetFertilityChance(); FillableBarLabeled(lineRect, " " + xxx.reproduction.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue, TextureCache.LutealTexture, Texture2D.blackTexture, Translations.FertilityDesc(string.Format("{0:0.##}", fertchance * 100))); - Rect overayRect = new Rect(lineRect.x, lineRect.y, lineRect.width * Math.Min(1.0f, fertchance), lineRect.height); - GUI.DrawTexture(overayRect, TextureCache.FertChanceTex); + Rect overlayRect = new Rect(lineRect.x, lineRect.y, lineRect.width * Math.Min(1.0f, fertchance), lineRect.height); + GUI.DrawTexture(overlayRect, TextureCache.FertChanceTex); lineRect.y += height; } diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Gizmo_Womb.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Gizmo_Womb.cs index c303d4e..aaaa96f 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Gizmo_Womb.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Gizmo_Womb.cs @@ -5,7 +5,7 @@ namespace RJW_Menstruation { public class Gizmo_Womb : Command_Action { - public Texture2D icon_overay; + public Texture2D icon_overlay; public Color cumcolor; public HediffComp_Menstruation comp; @@ -14,23 +14,23 @@ namespace RJW_Menstruation public override void DrawIcon(Rect rect, Material buttonMat, GizmoRenderParms parms) { Texture badTex = icon; - Texture2D overay = icon_overay; + Texture2D overlay = icon_overlay; Color color = cumcolor; if (badTex == null) { badTex = BaseContent.BadTex; } - if (overay == null) + if (overlay == null) { - overay = BaseContent.BadTex; + overlay = BaseContent.BadTex; } if (color == null) color = Color.white; rect.position += new Vector2(iconOffset.x * rect.size.x, iconOffset.y * rect.size.y); GUI.color = IconDrawColor; Widgets.DrawTextureFitted(rect, badTex, this.iconDrawScale * 0.85f, this.iconProportions, this.iconTexCoords, this.iconAngle, buttonMat); GUI.color = color; - Widgets.DrawTextureFitted(rect, overay, iconDrawScale * 0.85f, iconProportions, iconTexCoords, iconAngle, buttonMat); + Widgets.DrawTextureFitted(rect, overlay, iconDrawScale * 0.85f, iconProportions, iconTexCoords, iconAngle, buttonMat); GUI.color = Color.white; if (Configurations.DrawEggOverlay) comp.DrawEggOverlay(rect, false); Rect progressRect = new Rect(rect.x + 2f, rect.y, rect.width - 4f, progressbarHeight);