Refactor footprint cell lookups and move them to Building

Removing FootprintUtils happens in the next commit for better
reviewability.
This commit is contained in:
reaperrr
2017-06-28 14:00:50 +02:00
committed by abcdefg30
parent 801796b184
commit 46dc827d46
7 changed files with 112 additions and 85 deletions

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Traits
return true;
var res = world.WorldActor.Trait<ResourceLayer>();
return FootprintUtils.Tiles(world.Map.Rules, name, building, topLeft).All(
return building.Tiles(topLeft).All(
t => world.Map.Contains(t) && res.GetResource(t) == null &&
world.IsCellBuildable(t, building, toIgnore));
}