diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index 2ac459a..ce5f760 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 3f112d3..6afa95d 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Cum.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Cum.cs @@ -204,9 +204,8 @@ namespace RJW_Menstruation { // comp is used for Hydrogen's RJW Muscle Injury float totalleak = volume; - float decayPerInterval = 1 - Mathf.Pow(1 - Configurations.CumDecayRatio, comp.SimulationsPerHour); - float fertilityDecayPerInterval = 1 - Mathf.Pow(1 - Configurations.CumFertilityDecayRatio, comp.SimulationsPerHour); - antisperm *= comp.SimulationsPerHour; + 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); 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 55f34db..fe98f5a 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/DebugActions.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/DebugActions.cs @@ -10,10 +10,7 @@ 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); } @@ -37,10 +34,7 @@ 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); } /* @@ -63,13 +57,6 @@ 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 b618abe..0cbbf40 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.IsProPregnancy()) pawn.needs.mood.thoughts.memories.TryGainMemoryFast(VariousDefOf.HateTookContraceptivePill); + if (pawn.WantsToGetPregnant()) 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 558031d..5bb48b7 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,6 +75,9 @@ namespace RJW_Menstruation if (babyHalfAge <= 0) babyHalfAge = 1.2f / 2; // Default to human + if (RJWPregnancySettings.phantasy_pregnancy) + babyHalfAge /= GenDate.DaysPerYear; + return babyHalfAge; } } @@ -137,10 +140,10 @@ namespace RJW_Menstruation { base.CompExposeData(); - Scribe_Values.Look(ref ageOfLastBirth, "ageOfLastBirth", -1); + Scribe_Values.Look(ref ageOfLastBirth, "ageOfLastBirth", ageOfLastBirth, true); Scribe_Values.Look(ref maxBreastIncrement, "maxBreastIncrement", maxBreastIncrement, true); - Scribe_Values.Look(ref breastSizeIncreased, "breastSizeIncreased", 0.0f); - Scribe_Values.Look(ref nippleProgress, "nippleProgress", 0.0f); + Scribe_Values.Look(ref breastSizeIncreased, "breastSizeIncreased", breastSizeIncreased, true); + Scribe_Values.Look(ref nippleProgress, "nippleProgress", nippleProgress, true); Scribe_Values.Look(ref baseAlpha, "baseAlpha", baseAlpha, true); Scribe_Values.Look(ref baseAreola, "baseAreola", baseAreola, true); Scribe_Values.Look(ref baseNipple, "baseNipple", baseNipple, true); @@ -196,19 +199,19 @@ namespace RJW_Menstruation protected long CalculateLastBirth() { - long youngestAge = -1; + long youngestAge = (long)(BabyHalfAge * GenDate.TicksPerYear) * -2; // So a newborn isn't considered a new mother, either if ((Pawn.relations == null)) return youngestAge; - List rjwPregnancies = new List(); - Pawn.health.hediffSet.GetHediffs(ref rjwPregnancies); + List pregnancies = new List(); + Pawn.health.hediffSet.GetHediffs(ref pregnancies); bool hasChild = Pawn.relations.Children. - Where(child => !rjwPregnancies.Any(preg => preg.babies.Contains(child))). // no fetuses + Where(child => !pregnancies.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 = Math.Max(Pawn.ageTracker.AgeBiologicalTicks - youngest.ageTracker.AgeBiologicalTicks, -1); + if (hasChild) youngestAge = Pawn.ageTracker.AgeBiologicalTicks - youngest.ageTracker.AgeBiologicalTicks; return youngestAge; } @@ -221,7 +224,7 @@ namespace RJW_Menstruation { maxBreastIncrement = Utility.RandGaussianLike(0.088f, 0.202f); } - if (ageOfLastBirth == 0 || ageOfLastBirth < -1) + if (ageOfLastBirth == 0) { ageOfLastBirth = CalculateLastBirth(); } @@ -250,7 +253,7 @@ namespace RJW_Menstruation debugGrowthStatus = "Base size (ageless)"; } // The youngest child is less than halfway into babyhood: Full size - else if (ageOfLastBirth > 0 && ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > Pawn.ageTracker.AgeBiologicalTicks) + else if (ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > Pawn.ageTracker.AgeBiologicalTicks) { debugGrowthStatus = "Full size due to young child"; if (breastSizeIncreased < MaxBreastIncrement) @@ -296,7 +299,7 @@ namespace RJW_Menstruation float newNippleProgress; if (Pawn.ageTracker.BiologicalTicksPerTick <= 0f) newNippleProgress = 0f; - else if (ageOfLastBirth > 0 && ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > Pawn.ageTracker.AgeBiologicalTicks) + else if (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 c32ee83..2745e80 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) }; - protected int TickInterval + public int TickInterval { get { @@ -169,15 +169,13 @@ 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 <= Configurations.TickIntervalMinimum) tickInterval = Configurations.TickIntervalMinimum; + if (tickInterval <= 0) tickInterval = 1; } return tickInterval; } set => tickInterval = value; } - public float SimulationsPerHour => (float)TickInterval / GenDate.TicksPerHour; - public Hediff Pregnancy { get { @@ -338,7 +336,8 @@ 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); - if (OvulationChance > 1.0f) factor *= OvulationChance; + float ovulationOverflow = OvulationChance; + if (ovulationOverflow > 1.0f) factor *= ovulationOverflow; return Props.baseImplantationChanceFactor * FertilityModifier * factor; } else @@ -631,15 +630,6 @@ 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 @@ -1061,9 +1051,9 @@ namespace RJW_Menstruation if (Pawn.CurJobDef == xxx.knotted) leakfactor = 0f; foreach (Cum cum in cums) { - if (Rand.Chance(SimulationsPerHour)) cum.CumEffects(Pawn); + if (Rand.Chance((float)TickInterval / GenDate.TicksPerHour)) cum.CumEffects(Pawn); float vd = cum.DismishNatural(leakfactor, this, antisperm); - cum.MakeThinner((float)Configurations.CycleAcceleration * SimulationsPerHour); + cum.MakeThinner((float)Configurations.CycleAcceleration * TickInterval / GenDate.TicksPerHour); totalleak += AbsorbCum(vd, absorber); string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString()); filthlabels.Add(tmp.Replace(" x1", "")); @@ -1145,11 +1135,6 @@ namespace RJW_Menstruation cums.Clear(); } - public void RemoveAllEggs() - { - eggs.Clear(); - } - /// /// Fertilize eggs and return the result @@ -1368,7 +1353,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 * SimulationsPerHour); + float fertFailChancePerInterval = Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor * TickInterval / GenDate.TicksPerHour); if (Rand.Chance(fertFailChancePerInterval)) return null; @@ -1511,7 +1496,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) * SimulationsPerHour; + float bledAmount = 0.03f * Configurations.BleedingAmount * Configurations.CycleAcceleration * Rand.Range(0.5f, 1.5f) * TickInterval / GenDate.TicksPerHour; 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; @@ -1648,9 +1633,10 @@ 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; @@ -1658,7 +1644,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); } @@ -1797,7 +1783,8 @@ 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.IsProPregnancy()) + cummer.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || + cummer.HasQuirk(QuirkUtility.Quirks.Breeder)) { if (cummer.relations.OpinionOf(Pawn) <= -25) { @@ -1811,7 +1798,7 @@ namespace RJW_Menstruation if (IsDangerDay) { - if (Pawn.IsProPregnancy()) + if (Pawn.WantsToGetPregnant()) { Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetish, cummer); } @@ -1834,7 +1821,7 @@ namespace RJW_Menstruation } else { - if (Pawn.IsProPregnancy()) + if (Pawn.WantsToGetPregnant()) { 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 017a6ed..247149c 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,12 +79,15 @@ namespace RJW_Menstruation protected override void BleedingAction() { - base.BleedingAction(); - if (curStage != Stage.Bleeding) + if (curStageTicks >= currentIntervalTicks) { + Hediff hediff = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp); + if (hediff != null && !Pawn.GetMenstruationComps().Any(comp => comp != this && comp.curStage == Stage.Bleeding)) Pawn.health.RemoveHediff(hediff); 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 c3cd7e4..ab09dd3 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs @@ -3,7 +3,6 @@ using RimWorld.Planet; using rjw; using System; using System.Collections.Generic; -using System.Diagnostics.Eventing.Reader; using System.Linq; using UnityEngine; using Verse; @@ -218,36 +217,35 @@ 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; - else return GetOvaryIcon(comp); + 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); case HediffComp_Menstruation.Stage.Luteal: if (!comp.IsEggExist) break; int fertTime = comp.EggFertilizedTime; @@ -258,10 +256,6 @@ 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) @@ -407,7 +401,7 @@ namespace RJW_Menstruation return false; } - public static bool IsProPregnancy(this Pawn pawn) + public static bool WantsToGetPregnant(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 0b5d0c5..f9ab88e 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.IsProPregnancy() || pawn.relations?.DirectRelations?.Find(x => x.def.Equals(PawnRelationDefOf.Lover)) != null) + if (pawn.WantsToGetPregnant() || 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 86ef4d9..4571fae 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_overlay; + Texture2D icon, icon_overay; 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_overlay = comp.GetCumIcon(); - else icon_overlay = ContentFinder.Get(("Womb/Empty"), true); + if (gestationProgress < 0.2f) icon_overay = comp.GetCumIcon(); + else icon_overay = ContentFinder.Get(("Womb/Empty"), true); } - else icon_overlay = ContentFinder.Get(("Womb/Empty"), true); + else icon_overay = ContentFinder.Get(("Womb/Empty"), true); } else { icon = comp.GetWombIcon(); - icon_overlay = comp.GetCumIcon(); + icon_overay = comp.GetCumIcon(); } } else @@ -91,7 +91,7 @@ namespace RJW_Menstruation { icon = comp.GetWombIcon(); } - icon_overlay = comp.GetCumIcon(); + icon_overay = 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_overlay = icon_overlay, + icon_overay = icon_overay, 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 0448aac..2c8b4c8 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 overlayRect = new Rect(lineRect.x, lineRect.y, lineRect.width * Math.Min(1.0f, fertchance), lineRect.height); - GUI.DrawTexture(overlayRect, TextureCache.FertChanceTex); + Rect overayRect = new Rect(lineRect.x, lineRect.y, lineRect.width * Math.Min(1.0f, fertchance), lineRect.height); + GUI.DrawTexture(overayRect, 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 aaaa96f..c303d4e 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_overlay; + public Texture2D icon_overay; 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 overlay = icon_overlay; + Texture2D overay = icon_overay; Color color = cumcolor; if (badTex == null) { badTex = BaseContent.BadTex; } - if (overlay == null) + if (overay == null) { - overlay = BaseContent.BadTex; + overay = 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, overlay, iconDrawScale * 0.85f, iconProportions, iconTexCoords, iconAngle, buttonMat); + Widgets.DrawTextureFitted(rect, overay, 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);