From b0cd4ec3679cbbd01c7c87653ca02b8e9aaeb7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=A4rer?= Date: Sat, 30 Jan 2016 22:17:23 +0100 Subject: [PATCH] Fixed styling issues and TS compatibility --- OpenRA.Mods.Common/EditorBrushes/EditorTileBrush.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/OpenRA.Mods.Common/EditorBrushes/EditorTileBrush.cs b/OpenRA.Mods.Common/EditorBrushes/EditorTileBrush.cs index 1d7bea0809..b8bf47194e 100644 --- a/OpenRA.Mods.Common/EditorBrushes/EditorTileBrush.cs +++ b/OpenRA.Mods.Common/EditorBrushes/EditorTileBrush.cs @@ -136,21 +136,22 @@ namespace OpenRA.Mods.Common.Widgets return; var queue = new Queue(); - var touched = new bool[map.MapSize.X, map.MapSize.Y]; + var touched = new CellLayer(map); var rules = map.Rules; var tileset = rules.TileSets[map.Tileset]; var template = tileset.Templates[Template]; - Action maybeEnqueue = (newCell) => + Action maybeEnqueue = newCell => { - if (map.Contains(cell) && !touched[newCell.X, newCell.Y]) + if (map.Contains(cell) && !touched[newCell]) { queue.Enqueue(newCell); - touched[newCell.X, newCell.Y] = true; + touched[newCell] = true; } }; - Func shouldPaint = (cellToCheck) => + + Func shouldPaint = cellToCheck => { for (var y = 0; y < template.Size.Y; y++) {