Fix harvesters harvesting resources from underground.
This commit is contained in:
@@ -125,6 +125,10 @@ namespace OpenRA.Mods.Common
|
|||||||
public static bool CanHarvestAt(this Actor self, CPos pos, ResourceLayer resLayer, HarvesterInfo harvInfo,
|
public static bool CanHarvestAt(this Actor self, CPos pos, ResourceLayer resLayer, HarvesterInfo harvInfo,
|
||||||
ResourceClaimLayer territory)
|
ResourceClaimLayer territory)
|
||||||
{
|
{
|
||||||
|
// Resources only exist in the ground layer
|
||||||
|
if (pos.Layer != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
var resType = resLayer.GetResource(pos);
|
var resType = resLayer.GetResource(pos);
|
||||||
if (resType == null)
|
if (resType == null)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user