Implement proper TS Tiberium and Vein logic.

This commit is contained in:
Paul Chote
2021-02-24 20:26:49 +00:00
committed by reaperrr
parent 0bdd46451e
commit fcc3008b00
39 changed files with 739 additions and 41 deletions

View File

@@ -157,6 +157,11 @@ namespace OpenRA.Mods.Common
return Math.Abs(offset.X) < 2 && Math.Abs(offset.Y) < 2;
}
public static IEnumerable<CPos> ExpandFootprint(CPos cell, bool allowDiagonal)
{
return Neighbours(cell, allowDiagonal);
}
public static IEnumerable<CPos> ExpandFootprint(IEnumerable<CPos> cells, bool allowDiagonal)
{
return cells.SelectMany(c => Neighbours(c, allowDiagonal)).Distinct();