Esempio n. 1
0
        public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            Apiary tNR_Apiary = t as Apiary;

            if (tNR_Apiary == null || !tNR_Apiary.needTend)
            {
                return(false);
            }
            if (t.IsBurning())
            {
                return(false);
            }
            if (!t.IsForbidden(pawn))
            {
                LocalTargetInfo target = t;
                if (pawn.CanReserve(target, 1, -1, null, forced))
                {
                    return(true);
                }
            }
            return(false);
        }
        public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            Apiary tNR_Apiary = t as Apiary;
            int    skill      = pawn.skills.skills.Find((SkillRecord r) => r.def.defName == "Animals").levelInt;

            if (tNR_Apiary == null || !tNR_Apiary.HoneyReady || skill < 5)
            {
                return(false);
            }
            if (t.IsBurning())
            {
                return(false);
            }
            if (!t.IsForbidden(pawn))
            {
                LocalTargetInfo target = t;
                if (pawn.CanReserve(target, 1, -1, null, forced))
                {
                    return(true);
                }
            }
            return(false);
        }