Exemple #1
0
        private bool IsHunting(Pawn pawn, Pawn prey)
        {
            if (pawn.CurJob == null)
            {
                return(false);
            }
            JobDriver_Hunt jobDriver_Hunt = pawn.jobs.curDriver as JobDriver_Hunt;

            if (jobDriver_Hunt != null)
            {
                return(jobDriver_Hunt.Victim == prey);
            }
            JobDriver_PredatorHunt jobDriver_PredatorHunt = pawn.jobs.curDriver as JobDriver_PredatorHunt;

            return(jobDriver_PredatorHunt != null && jobDriver_PredatorHunt.Prey == prey);
        }
Exemple #2
0
        private bool IsHunting(Pawn pawn, Pawn prey)
        {
            bool result;

            if (pawn.CurJob == null)
            {
                result = false;
            }
            else
            {
                JobDriver_Hunt jobDriver_Hunt = pawn.jobs.curDriver as JobDriver_Hunt;
                if (jobDriver_Hunt != null)
                {
                    result = (jobDriver_Hunt.Victim == prey);
                }
                else
                {
                    JobDriver_PredatorHunt jobDriver_PredatorHunt = pawn.jobs.curDriver as JobDriver_PredatorHunt;
                    result = (jobDriver_PredatorHunt != null && jobDriver_PredatorHunt.Prey == prey);
                }
            }
            return(result);
        }