public override AcceptanceReport CanDesignateCell(IntVec3 c)
        {
            if (!c.InBounds(base.Map) || c.Fogged(base.Map))
            {
                return(false);
            }
            if (base.Map.designationManager.DesignationAt(c, DesignationDefOf.RemoveFloor) != null)
            {
                return(false);
            }
            Building edifice = c.GetEdifice(base.Map);

            if (edifice != null && edifice.def.Fillage == FillCategory.Full && edifice.def.passability == Traversability.Impassable)
            {
                return(false);
            }
            if (!base.Map.terrainGrid.CanRemoveTopLayerAt(c))
            {
                return("TerrainMustBeRemovable".Translate());
            }
            if (WorkGiver_ConstructRemoveFloor.AnyBuildingBlockingFloorRemoval(c, base.Map))
            {
                return(false);
            }
            return(AcceptanceReport.WasAccepted);
        }
示例#2
0
 public override bool HasJobOnCell(Pawn pawn, IntVec3 c, bool forced = false)
 {
     return(base.HasJobOnCell(pawn, c, false) && pawn.Map.terrainGrid.CanRemoveTopLayerAt(c) && !WorkGiver_ConstructRemoveFloor.AnyBuildingBlockingFloorRemoval(c, pawn.Map));
 }