#250 resources should have a list of allowed terrain types

This commit is contained in:
Chris Forbes
2011-01-08 09:31:36 +13:00
parent 712eb437ea
commit 93a56f9a18
5 changed files with 29 additions and 15 deletions

View File

@@ -51,7 +51,7 @@ namespace OpenRA.Mods.RA
// Todo: Valid terrain should be specified in the resource
if (cell != null && self.World.Map.IsInMap(cell.Value) &&
(resLayer.GetResource(cell.Value) == resourceType
|| (resLayer.GetResource(cell.Value) == null && resLayer.AllowResourceAt(cell.Value))))
|| (resLayer.GetResource(cell.Value) == null && resLayer.AllowResourceAt(resourceType, cell.Value))))
resLayer.AddResource(resourceType, cell.Value.X, cell.Value.Y, 1);
ticks = info.Interval;