Separated resource rendering into another trait

This commit is contained in:
teinarss
2019-06-18 22:09:45 +02:00
committed by abcdefg30
parent 0e93d85273
commit f0b69f8b8d
16 changed files with 377 additions and 180 deletions

View File

@@ -277,7 +277,7 @@ namespace OpenRA.Mods.Common.Orders
{
var isCloseEnough = buildingInfo.IsCloseEnoughToBase(world, world.LocalPlayer, actorInfo, topLeft);
foreach (var t in buildingInfo.Tiles(topLeft))
footprint.Add(t, MakeCellType(isCloseEnough && world.IsCellBuildable(t, actorInfo, buildingInfo) && (resourceLayer == null || resourceLayer.GetResource(t) == null)));
footprint.Add(t, MakeCellType(isCloseEnough && world.IsCellBuildable(t, actorInfo, buildingInfo) && (resourceLayer == null || resourceLayer.GetResourceType(t) == null)));
}
return preview != null ? preview.Render(wr, topLeft, footprint) : Enumerable.Empty<IRenderable>();