From 76eec3852a2eb4ce46fba19324f6f379fc740808 Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Tue, 5 Sep 2023 10:46:24 -0700 Subject: [PATCH] Use explicit types in a few places --- .../RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs | 2 +- .../HediffComps/HediffComp_PregeneratedBabies.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 5a5fa03..025e184 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 @@ -311,7 +311,7 @@ namespace RJW_Menstruation // Replicate how rjw.PawnCapacityWorker_Fertility.CalculateCapacityLevel does it, but without the age factor if (!Pawn.RaceHasFertility()) return 0.0f; if (AndroidsCompatibility.IsAndroid(Pawn) && parent.def != Genital_Helper.archotech_vagina) return 0.0f; - foreach (var part in StatDefOf.Fertility.parts) + foreach (StatPart part in StatDefOf.Fertility.parts) { if(part is StatPart_FertilityByGenderAge fertilityByAge) { diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs index 1979c84..79c13a9 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs @@ -284,7 +284,7 @@ namespace RJW_Menstruation public static IEnumerable Transpiler(IEnumerable instructions) { if (ApplyBirthOutcome?.ReturnType != typeof(Thing)) throw new InvalidOperationException("ApplyBirthOutcome not found"); - foreach (var instruction in instructions) + foreach (CodeInstruction instruction in instructions) { if (instruction.Calls(ApplyBirthOutcome)) yield return CodeInstruction.Call(typeof(Ritual_ChildBirth_Apply_Patch), nameof(Ritual_ChildBirth_Apply_Patch.ApplyBirthLoop));