Separated resource rendering into another trait
This commit is contained in:
@@ -269,7 +269,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (cell.Layer != 0)
|
||||
return false;
|
||||
|
||||
var resType = resLayer.GetResource(cell);
|
||||
var resType = resLayer.GetResourceType(cell);
|
||||
if (resType == null)
|
||||
return false;
|
||||
|
||||
@@ -395,7 +395,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!self.Owner.Shroud.IsExplored(location))
|
||||
return false;
|
||||
|
||||
var res = self.World.WorldActor.Trait<ResourceLayer>().GetRenderedResource(location);
|
||||
var res = self.World.WorldActor.Trait<ResourceRenderer>().GetRenderedResourceType(location);
|
||||
var info = self.Info.TraitInfo<HarvesterInfo>();
|
||||
|
||||
if (res == null || !info.Resources.Contains(res.Info.Type))
|
||||
|
||||
Reference in New Issue
Block a user