예제 #1
0
        public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            if ((t is Building_FishingPier) == false)
            {
                return(false);
            }
            Building_FishingPier fishingPier = t as Building_FishingPier;

            if (fishingPier.IsBurning())
            {
                return(false);
            }
            if (Util_FishIndustry.IsAquaticTerrain(fishingPier.Map, fishingPier.fishingSpotCell) == false)
            {
                return(false);
            }
            if (pawn.Dead ||
                pawn.Downed ||
                pawn.IsBurning())
            {
                return(false);
            }
            if (pawn.CanReserveAndReach(fishingPier, this.PathEndMode, Danger.Some) == false)
            {
                return(false);
            }
            if (fishingPier.fishStock <= 0)
            {
                return(false);
            }
            return(true);
        }
        public bool FishingForbiddenOrPierDestroyedOrNoFish()
        {
            Building_FishingPier fishingPier = this.TargetThingA as Building_FishingPier;

            if ((fishingPier.DestroyedOrNull()) ||
                fishingPier.IsBurning() ||
                fishingPier.IsForbidden(fishingPier.Faction) ||
                (fishingPier.allowFishing == false) ||
                (fishingPier.fishStock == 0))
            {
                return(true);
            }
            return(false);
        }