Ejemplo n.º 1
0
 public override bool StateCanOccur(Pawn pawn)
 {
     if (!base.StateCanOccur(pawn))
     {
         return(false);
     }
     return(JailbreakerMentalStateUtility.FindPrisoner(pawn) != null);
 }
 public override void MentalStateTick()
 {
     base.MentalStateTick();
     if (base.pawn.IsHashIntervalTick(500) && JailbreakerMentalStateUtility.FindPrisoner(base.pawn) == null)
     {
         base.RecoverFromState();
     }
 }
Ejemplo n.º 3
0
        protected override Job TryGiveJob(Pawn pawn)
        {
            Pawn pawn2 = JailbreakerMentalStateUtility.FindPrisoner(pawn);

            if (pawn2 != null && pawn.CanReach(pawn2, PathEndMode.Touch, Danger.Deadly, false, TraverseMode.ByPawn))
            {
                Job job = new Job(JobDefOf.InducePrisonerToEscape, pawn2);
                job.interaction = InteractionDefOf.SparkJailbreak;
                return(job);
            }
            return(null);
        }
        protected override Job TryGiveJob(Pawn pawn)
        {
            Pawn pawn2 = JailbreakerMentalStateUtility.FindPrisoner(pawn);

            if (pawn2 == null || !pawn.CanReach(pawn2, PathEndMode.Touch, Danger.Deadly))
            {
                return(null);
            }
            Job job = JobMaker.MakeJob(JobDefOf.InducePrisonerToEscape, pawn2);

            job.interaction = InteractionDefOf.SparkJailbreak;
            return(job);
        }
Ejemplo n.º 5
0
        protected override Job TryGiveJob(Pawn pawn)
        {
            Pawn pawn2 = JailbreakerMentalStateUtility.FindPrisoner(pawn);
            Job  result;

            if (pawn2 == null || !pawn.CanReach(pawn2, PathEndMode.Touch, Danger.Deadly, false, TraverseMode.ByPawn))
            {
                result = null;
            }
            else
            {
                result = new Job(JobDefOf.InducePrisonerToEscape, pawn2)
                {
                    interaction = InteractionDefOf.SparkJailbreak
                };
            }
            return(result);
        }