public override void MentalStateTick() { base.MentalStateTick(); if (base.pawn.IsHashIntervalTick(600)) { if (base.pawn.CurJob != null && base.pawn.CurJob.def == JobDefOf.Slaughter) { return; } if (SlaughtererMentalStateUtility.FindAnimal(base.pawn) == null) { base.RecoverFromState(); } } }
public override bool StateCanOccur(Pawn pawn) { return(base.StateCanOccur(pawn) && SlaughtererMentalStateUtility.FindAnimal(pawn) != null); }
public override void MentalStateTick() { base.MentalStateTick(); if (this.pawn.IsHashIntervalTick(600) && (this.pawn.CurJob == null || this.pawn.CurJob.def != JobDefOf.Slaughter) && SlaughtererMentalStateUtility.FindAnimal(this.pawn) == null) { base.RecoverFromState(); } }