diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs index 52eda3e..20af3cc 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs @@ -166,8 +166,7 @@ namespace RJW_Menstruation { if ( !parent.pawn.IsHashIntervalTick(tickInterval) || - !parent.pawn.Spawned || // TODO: Add option to simulate off-map pawns - parent.pawn.health.Dead + !parent.pawn.Spawned // TODO: Add option to simulate off-map pawns ) { return; 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 8df870a..f98a4d5 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 @@ -1,4 +1,5 @@ using RimWorld; +using RimWorld.Planet; using rjw; using System; using System.Collections.Generic; @@ -560,7 +561,6 @@ namespace RJW_Menstruation if ( !parent.pawn.IsHashIntervalTick(tickInterval) || !parent.pawn.Spawned || // TODO: Add option to simulate off-map pawns - parent.pawn.health.Dead || (parent.pawn.IsAnimal() && !Configurations.EnableAnimalCycle) ) { @@ -1120,10 +1120,11 @@ namespace RJW_Menstruation public bool IsBreedingSeason() { if (Props.breedingSeason == SeasonalBreed.Always) return true; - Map map = parent.pawn.Map; - if (map == null) map = Find.AnyPlayerHomeMap; - if (map == null) return true; - switch (GenLocalDate.Season(map)) + + int tile = parent.pawn.Tile; + if (tile < 0) tile = Find.AnyPlayerHomeMap?.Tile ?? -1; + if (tile < 0) return true; + switch (GenLocalDate.Season(tile)) { case Season.Spring: return (Props.breedingSeason & SeasonalBreed.Spring) != 0;