mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Do the infertile check after the simulation instead of before
This commit is contained in:
		
							parent
							
								
									2facc09926
								
							
						
					
					
						commit
						5fbed7073a
					
				
					 1 changed files with 7 additions and 6 deletions
				
			
		| 
						 | 
					@ -716,7 +716,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                BeforeSimulator();
 | 
					                BeforeSimulator();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (ShouldBeInfertile()) GoNextStage(Stage.Infertile);
 | 
					 | 
				
			||||||
                switch (curStage)
 | 
					                switch (curStage)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    case Stage.Follicular:
 | 
					                    case Stage.Follicular:
 | 
				
			||||||
| 
						 | 
					@ -749,6 +748,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                        GoNextStage(Stage.Follicular);
 | 
					                        GoNextStage(Stage.Follicular);
 | 
				
			||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                AfterSimulator();
 | 
					                AfterSimulator();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            catch (Exception ex)
 | 
					            catch (Exception ex)
 | 
				
			||||||
| 
						 | 
					@ -1263,6 +1263,11 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        protected virtual void AfterSimulator()
 | 
					        protected virtual void AfterSimulator()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					            if (ShouldBeInfertile())
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                eggs.Clear();
 | 
				
			||||||
 | 
					                GoNextStage(Stage.Infertile);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            if (EggHealth < 1f)
 | 
					            if (EggHealth < 1f)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (sexNeed == null) sexNeed = Pawn.needs.TryGetNeed(VariousDefOf.SexNeed);
 | 
					                if (sexNeed == null) sexNeed = Pawn.needs.TryGetNeed(VariousDefOf.SexNeed);
 | 
				
			||||||
| 
						 | 
					@ -1727,11 +1732,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (curStageTicks >= currentIntervalTicks)
 | 
					            if (curStageTicks >= currentIntervalTicks)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (ShouldBeInfertile())
 | 
					                if (!IsBreedingSeason())
 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    GoNextStage(Stage.Infertile);
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                else if (!IsBreedingSeason())
 | 
					 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    GoNextStage(Stage.Anestrus);
 | 
					                    GoNextStage(Stage.Anestrus);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue