mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Move the hash interval to the start of CompPostTick, since ShouldSimulate is getting heavy
This commit is contained in:
		
							parent
							
								
									0e708c6c89
								
							
						
					
					
						commit
						dc33024d42
					
				
					 2 changed files with 4 additions and 8 deletions
				
			
		| 
						 | 
					@ -739,6 +739,9 @@ namespace RJW_Menstruation
 | 
				
			||||||
            // If an exception makes it out, RW will remove the hediff, so catch it here
 | 
					            // If an exception makes it out, RW will remove the hediff, so catch it here
 | 
				
			||||||
            try
 | 
					            try
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					                if (Pawn.IsHashIntervalTick(recalculateTickInterval)) TickInterval = -1;  // Every so often, force TickInterval to be recalculated in case the pawn's status changed.
 | 
				
			||||||
 | 
					                if (!Pawn.IsHashIntervalTick(TickInterval)) return;
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
                if (!ShouldSimulate()) return;
 | 
					                if (!ShouldSimulate()) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // Initialize immediately if needed, but if there's an error, then don't spam it every tick
 | 
					                // Initialize immediately if needed, but if there's an error, then don't spam it every tick
 | 
				
			||||||
| 
						 | 
					@ -748,9 +751,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
                    Initialize();
 | 
					                    Initialize();
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
               
 | 
					               
 | 
				
			||||||
                if (Pawn.IsHashIntervalTick(recalculateTickInterval)) TickInterval = -1;  // Every so often, force TickInterval to be recalculated in case the pawn's status changed.
 | 
					 | 
				
			||||||
                if (!Pawn.IsHashIntervalTick(TickInterval)) return;
 | 
					 | 
				
			||||||
                
 | 
					 | 
				
			||||||
                if (initError) Log.Warning($"Attempting to process {Pawn}'s womb uninitialized");
 | 
					                if (initError) Log.Warning($"Attempting to process {Pawn}'s womb uninitialized");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (Pregnancy != null && curStage != Stage.Pregnant)
 | 
					                if (Pregnancy != null && curStage != Stage.Pregnant)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,10 +37,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
                if (t.Pawn == pawn && pawn.HasMenstruationComp()) opts.AddDistinct(MakeSelfMenu(pawn, t));
 | 
					                if (t.Pawn == pawn && pawn.HasMenstruationComp()) opts.AddDistinct(MakeSelfMenu(pawn, t));
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static FloatMenuOption MakeSelfMenu(Pawn pawn, LocalTargetInfo target)
 | 
					        public static FloatMenuOption MakeSelfMenu(Pawn pawn, LocalTargetInfo target)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue