let harvester splatter resources when exploding

closes #2346
This commit is contained in:
Matthias Mailänder
2014-05-13 18:52:30 +02:00
parent 3e627d2eba
commit e607c04cce
10 changed files with 86 additions and 12 deletions

View File

@@ -153,6 +153,13 @@ namespace OpenRA.Traits
return true;
}
public bool CanSpawnResourceAt(ResourceType newResourceType, CPos cell)
{
var currentResourceType = GetResource(cell);
return currentResourceType == newResourceType
|| (currentResourceType == null && AllowResourceAt(newResourceType, cell));
}
CellContents CreateResourceCell(ResourceType t, CPos p)
{
world.Map.CustomTerrain[p.X, p.Y] = world.TileSet.GetTerrainIndex(t.Info.TerrainType);