예제 #1
0
 public override bool StateCanOccur(Pawn pawn)
 {
     if (!base.StateCanOccur(pawn))
     {
         return(false);
     }
     return(CorpseObsessionMentalStateUtility.GetClosestCorpseToDigUp(pawn) != null);
 }
예제 #2
0
        public override void MentalStateTick()
        {
            bool flag = false;

            if (base.pawn.IsHashIntervalTick(500) && !CorpseObsessionMentalStateUtility.IsCorpseValid(this.corpse, base.pawn, false))
            {
                this.corpse = CorpseObsessionMentalStateUtility.GetClosestCorpseToDigUp(base.pawn);
                if (this.corpse == null)
                {
                    base.RecoverFromState();
                    flag = true;
                }
            }
            if (!flag)
            {
                base.MentalStateTick();
            }
        }
        public override void MentalStateTick()
        {
            if (alreadyHauledCorpse)
            {
                base.MentalStateTick();
                return;
            }
            bool flag = false;

            if (pawn.IsHashIntervalTick(500) && !CorpseObsessionMentalStateUtility.IsCorpseValid(corpse, pawn))
            {
                corpse = CorpseObsessionMentalStateUtility.GetClosestCorpseToDigUp(pawn);
                if (corpse == null)
                {
                    RecoverFromState();
                    flag = true;
                }
            }
            if (!flag)
            {
                base.MentalStateTick();
            }
        }
예제 #4
0
 public override void PostStart(string reason)
 {
     base.PostStart(reason);
     this.corpse = CorpseObsessionMentalStateUtility.GetClosestCorpseToDigUp(base.pawn);
 }