Ore.cs is dead. Long live ResourceLayer.cs.

This commit is contained in:
Chris Forbes
2010-03-03 21:15:44 +13:00
parent 6c229f3273
commit 15b82830a2
8 changed files with 14 additions and 74 deletions

View File

@@ -149,8 +149,9 @@ namespace OpenRA
public static bool CanPlaceBuilding(this World world, string name, BuildingInfo building, int2 topLeft, Actor toIgnore)
{
var res = world.WorldActor.traits.Get<ResourceLayer>();
return !Footprint.Tiles(name, building, topLeft).Any(
t => !world.Map.IsInMap(t.X, t.Y) || world.Map.ContainsResource(t) || !world.IsCellBuildable(t,
t => !world.Map.IsInMap(t.X, t.Y) || res.GetResource(t) != null || !world.IsCellBuildable(t,
building.WaterBound ? UnitMovementType.Float : UnitMovementType.Wheel,
toIgnore));
}