Fix PBOG and Building to support concrete placement.

This commit is contained in:
Paul Chote
2014-03-16 23:12:46 +13:00
parent cc34a40ebc
commit e6c041e53f
3 changed files with 14 additions and 4 deletions

View File

@@ -31,6 +31,9 @@ namespace OpenRA.Mods.RA.Buildings
public static bool CanPlaceBuilding(this World world, string name, BuildingInfo building, CPos topLeft, Actor toIgnore)
{
if (building.AllowInvalidPlacement)
return true;
var res = world.WorldActor.Trait<ResourceLayer>();
return FootprintUtils.Tiles(name, building, topLeft).All(
t => world.Map.IsInMap(t.X, t.Y) && res.GetResource(t) == null &&