local player buildings influence map, incrementally updated.
This commit is contained in:
@@ -35,5 +35,23 @@ namespace OpenRa.Game.GameRules
|
||||
buildingFootprints = buildings
|
||||
.ToDictionary(a => a.Name, a => a.Pat);
|
||||
}
|
||||
|
||||
public static IEnumerable<int2> Tiles(string name, int2 position)
|
||||
{
|
||||
var footprint = Rules.Footprint.GetFootprint(name);
|
||||
var j = 0;
|
||||
|
||||
foreach (var row in footprint)
|
||||
{
|
||||
var i = 0;
|
||||
foreach (var c in row)
|
||||
{
|
||||
if (c != '_')
|
||||
yield return position + new int2(i, j);
|
||||
++i;
|
||||
}
|
||||
++j;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user