mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Jobdriver works until spawning
This commit is contained in:
		
							parent
							
								
									1b547094fe
								
							
						
					
					
						commit
						d1129fece2
					
				
					 2 changed files with 2 additions and 6 deletions
				
			
		| 
						 | 
					@ -18,11 +18,9 @@ namespace RJW_Genes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public override void CompPostTick(ref float severityAdjustment)
 | 
					        public override void CompPostTick(ref float severityAdjustment)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            ModLog.Debug("Running HediffComp_ProcessCumbucket CompPostTick");
 | 
					 | 
				
			||||||
            if (this.Props.mtbDaysPerStage[this.parent.CurStageIndex] > 0f && base.Pawn.IsHashIntervalTick(60) && Rand.MTBEventOccurs(this.Props.mtbDaysPerStage[this.parent.CurStageIndex], 60000f, 60f))
 | 
					            if (this.Props.mtbDaysPerStage[this.parent.CurStageIndex] > 0f && base.Pawn.IsHashIntervalTick(60) && Rand.MTBEventOccurs(this.Props.mtbDaysPerStage[this.parent.CurStageIndex], 60000f, 60f))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					                ModLog.Debug($"Triggered HediffComp_ProcessCumbucket CompPostTick - Starting a JobDriver ProcessCumbucket for {this.parent.pawn}");
 | 
				
			||||||
                ModLog.Debug("Firing HediffComp_ProcessCumbucket CompPostTick");
 | 
					 | 
				
			||||||
                this.Pawn.jobs.StartJob(JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("ProcessCumbucket")), lastJobEndCondition: Verse.AI.JobCondition.InterruptForced, resumeCurJobAfterwards: true);
 | 
					                this.Pawn.jobs.StartJob(JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("ProcessCumbucket")), lastJobEndCondition: Verse.AI.JobCondition.InterruptForced, resumeCurJobAfterwards: true);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,11 +22,9 @@ namespace RJW_Genes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        protected override IEnumerable<Toil> MakeNewToils()
 | 
					        protected override IEnumerable<Toil> MakeNewToils()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (ModsConfig.IsActive("rjw.sexperience"))
 | 
					            if (!ModsConfig.IsActive("rjw.sexperience"))
 | 
				
			||||||
                yield break;
 | 
					                yield break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ModLog.Debug("Starting Toils for Processing Cumbucket");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            Toil toil = new Toil();
 | 
					            Toil toil = new Toil();
 | 
				
			||||||
            toil.initAction = delegate ()
 | 
					            toil.initAction = delegate ()
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue