private bool CanBuild(ExtRect br, ExtRect area) { try { AbstractMap map = (AbstractMap)Owner; bool result = area.Contains(br); if (result) { br.Inflate(+1, +1); bool res = map.ForEachTile(br.Left, br.Top, br.Right, br.Bottom, CanBuildCheck); if (!res) { return(false); } /*for (int y = br.Top; y <= br.Bottom; y++) { * for (int x = br.Left; x <= br.Right; x++) { * BaseTile tile = map.GetTile(x, y); * if (tile != null) { * int bg = tile.Background; * if (bg == PlaceID.pid_Floor || bg == PlaceID.pid_RnFloor) { * return false; * } * } else { * return false; * } * } * }*/ } return(true); } catch (Exception ex) { Logger.Write("Building.canBuild(): " + ex.Message); return(false); } }