public override AcceptanceReport CanDesignateCell(IntVec3 c)
        {
            if (!c.InBounds(base.Map))
            {
                return(false);
            }
            if (c.Fogged(base.Map))
            {
                return(false);
            }
            if (base.Map.designationManager.DesignationAt(c, DesignationDefOf.SmoothFloor) != null || base.Map.designationManager.DesignationAt(c, DesignationDefOf.SmoothWall) != null)
            {
                return("SurfaceBeingSmoothed".Translate());
            }
            if (c.InNoBuildEdgeArea(base.Map))
            {
                return("TooCloseToMapEdge".Translate());
            }
            Building edifice = c.GetEdifice(base.Map);

            if (edifice != null && edifice.def.IsSmoothable)
            {
                return(AcceptanceReport.WasAccepted);
            }
            if (edifice != null && !SmoothSurfaceDesignatorUtility.CanSmoothFloorUnder(edifice))
            {
                return("MessageMustDesignateSmoothableSurface".Translate());
            }
            if (!c.GetTerrain(base.Map).affordances.Contains(TerrainAffordanceDefOf.SmoothableStone))
            {
                return("MessageMustDesignateSmoothableSurface".Translate());
            }
            return(AcceptanceReport.WasAccepted);
        }
 public static void Notify_BuildingSpawned(Building b)
 {
     if (!SmoothSurfaceDesignatorUtility.CanSmoothFloorUnder(b))
     {
         CellRect.CellRectIterator iterator = b.OccupiedRect().GetIterator();
         while (!iterator.Done())
         {
             Designation designation = b.Map.designationManager.DesignationAt(iterator.Current, DesignationDefOf.SmoothFloor);
             if (designation != null)
             {
                 b.Map.designationManager.RemoveDesignation(designation);
             }
             iterator.MoveNext();
         }
     }
 }