diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index 067825e..4c4e8b4 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -1059,8 +1059,8 @@ namespace RJW_Menstruation { if (Props.breedingSeason == SeasonalBreed.Always) return true; Map map = parent.pawn.Map; - if (map is null) map = Find.AnyPlayerHomeMap; - if (map is null) return true; + if (map == null) map = Find.AnyPlayerHomeMap; + if (map == null) return true; switch (GenLocalDate.Season(map)) { case Season.Spring: @@ -1130,7 +1130,7 @@ namespace RJW_Menstruation egg.fertstage < minImplantAgeHours || egg.position < Math.Min(Props.lutealIntervalDays / 2, maxImplantDelayDays) * 24) continue; - else if (egg.fertilizer is null) + else if (egg.fertilizer == null) { deadeggs.Add(egg); continue; diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs index 887f6b8..d8dafdb 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs @@ -30,7 +30,7 @@ namespace RJW_Menstruation var pawnparts = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn)); HediffComp_Menstruation comp = partner.GetMenstruationComp(); - if (comp is null) return true; + if (comp == null) return true; if (Genital_Helper.has_penis_fertile(pawn, pawnparts) && PregnancyHelper.CanImpregnate(pawn, partner, sextype)) { @@ -237,7 +237,7 @@ namespace RJW_Menstruation foreach(CodeInstruction instruction in instructions) { // Get where the compiler decided to index the pawn at - if (pawn_index is null && instruction.opcode == OpCodes.Stloc_S) // the first stloc.s in the IL is the pawn being loaded out of the list + if (pawn_index == null && instruction.opcode == OpCodes.Stloc_S) // the first stloc.s in the IL is the pawn being loaded out of the list { // a future RJW or compiler update might change this, or maybe another mod's patch pawn_index = (LocalBuilder)instruction.operand; yield return instruction;