using System; using System.Collections.Generic; using System.Linq; using OpenRa.FileFormats; using OpenRa.Game.Support; using OpenRa.Game.Traits; namespace OpenRa.Game.Traits { class GeneratesGap { Actor self; public GeneratesGap(Actor self) { this.self = self; } public IEnumerableGetShroudedTiles() { // Gap Generator building; powered down if (self.traits.Contains() && self.traits.Get().Disabled) yield break; // It won't let me return Game.FindTilesInCircle directly...? foreach (var t in Game.FindTilesInCircle(self.Location, Rules.General.GapRadius)) yield return t; } } }