public virtual void JobTrackerTick() { jobsGivenThisTick = 0; jobsGivenThisTickTextual = string.Empty; if (caravan.IsHashIntervalTick(30)) { //ThinkResult thinkResult = this.DetermineNextConstantThinkTreeJob(); //if (thinkResult.IsValid && this.ShouldStartJobFromThinkTree(thinkResult)) //{ // this.CheckLeaveJoinableLordBecauseJobIssued(thinkResult); // this.StartJob(thinkResult.Job, JobCondition.InterruptForced, thinkResult.SourceNode, false, false, null, null); //this.caravan.thinker.ConstantThinkTree, thinkResult.Tag); //} } if (curDriver != null) { curDriver.DriverTick(); } if (curJob == null && //!this.caravan.Dead && this.caravan.mindState.Active && CanDoAnyJob()) { if (debugLog) { DebugLogEvent("Starting job from Tick because curJob == null."); } TryFindAndStartJob(); } FinalizeTick(); }
public virtual void JobTrackerTick() { jobsGivenThisTick = 0; jobsGivenThisTickTextual = ""; //if (caravan.IsHashIntervalTick(ConstantThinkTreeJobCheckIntervalTicks)) //{ // var thinkResult = DetermineNextConstantThinkTreeJob(); // if (thinkResult.IsValid && ShouldStartJobFromThinkTree(thinkResult)) // { // CheckLeaveJoinableLordBecauseJobIssued(thinkResult); // StartJob(thinkResult.Job, JobCondition.InterruptForced, thinkResult.SourceNode, false, false); //caravan.thinker.ConstantThinkTree, thinkResult.Tag); // } //} curDriver?.DriverTick(); if (curJob == null && //!caravan.Dead && caravan.mindState.Active && CanDoAnyJob()) { DebugLogEvent("Starting job from Tick because curJob == null."); TryFindAndStartJob(); } FinalizeTick(); }