private void RemoveOrphanedTile(MapManager map, ValidationRow row, StringBuilder summary) { Item tile = map.CurrentLayer.GetTile(row.TileLocation); summary.AppendLine($"Removed orphaned extension tile from {row.TileLocation}"); tile.Delete(); }
private void Fix(MapManager map, ValidationRow error, StringBuilder summary) { Item tile = map.Items.Layer2.GetTile(error.TileLocation); summary.AppendLine($"Removed unsupported layer 2 tile from {error.TileLocation}"); tile.Delete(); }
private void RemoveIncompleteItem(MapManager map, ValidationRow row, StringBuilder summary) { Item root = map.CurrentLayer.GetTile(row.TileLocation); Debug.Assert(root.IsRoot); Size size = root.GetSize(); for (int x = 0; x < size.Width; x++) { for (int y = 0; y < size.Height; y++) { Point extLoc = new Point(row.TileLocation.X + x, row.TileLocation.Y + y); Item extension = map.CurrentLayer.GetTile(extLoc); if (extension.ExtensionX == x && extension.ExtensionY == y) { extension.Delete(); summary.AppendLine($"incomplete item extension removed from {extLoc}"); } } } root.Delete(); summary.AppendLine($"incomplete item root removed from {row.TileLocation}"); }