mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Dead pawns don't get hediff ticks
This commit is contained in:
		
							parent
							
								
									4fc1d6b4ab
								
							
						
					
					
						commit
						d9dc79f107
					
				
					 2 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue