Use the rendered resource state for the harvest order targeter.
This commit is contained in:
@@ -213,6 +213,7 @@ namespace OpenRA.Traits
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ResourceType GetResource(CPos p) { return content[p.X, p.Y].Type; }
|
public ResourceType GetResource(CPos p) { return content[p.X, p.Y].Type; }
|
||||||
|
public ResourceType GetRenderedResource(CPos p) { return render[p.X, p.Y].Type; }
|
||||||
public int GetResourceDensity(CPos p) { return content[p.X, p.Y].Density; }
|
public int GetResourceDensity(CPos p) { return content[p.X, p.Y].Density; }
|
||||||
public int GetMaxResourceDensity(CPos p)
|
public int GetMaxResourceDensity(CPos p)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ namespace OpenRA.Mods.RA
|
|||||||
if (!self.Owner.Shroud.IsExplored(location))
|
if (!self.Owner.Shroud.IsExplored(location))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var res = self.World.WorldActor.Trait<ResourceLayer>().GetResource(location);
|
var res = self.World.WorldActor.Trait<ResourceLayer>().GetRenderedResource(location);
|
||||||
var info = self.Info.Traits.Get<HarvesterInfo>();
|
var info = self.Info.Traits.Get<HarvesterInfo>();
|
||||||
|
|
||||||
if (res == null || !info.Resources.Contains(res.info.Name))
|
if (res == null || !info.Resources.Contains(res.info.Name))
|
||||||
|
|||||||
Reference in New Issue
Block a user