public override void MentalStateTick()
        {
            bool flag = false;

            if (this.pawn.IsHashIntervalTick(500) && !CorpseObsessionMentalStateUtility.IsCorpseValid(this.corpse, this.pawn, false))
            {
                this.corpse = CorpseObsessionMentalStateUtility.GetClosestCorpseToDigUp(this.pawn);
                if (this.corpse == null)
                {
                    base.RecoverFromState();
                    flag = true;
                }
            }
            if (!flag)
            {
                base.MentalStateTick();
            }
        }
 public override void PostStart(string reason)
 {
     base.PostStart(reason);
     this.corpse = CorpseObsessionMentalStateUtility.GetClosestCorpseToDigUp(this.pawn);
 }
Пример #3
0
 public override bool StateCanOccur(Pawn pawn)
 {
     return(base.StateCanOccur(pawn) && CorpseObsessionMentalStateUtility.GetClosestCorpseToDigUp(pawn) != null);
 }