Merge IOrderTargeter.CanTargetActor and CanTargetLocation.
This commit is contained in:
@@ -419,16 +419,15 @@ namespace OpenRA.Mods.RA
|
||||
public int OrderPriority { get { return 10; } }
|
||||
public bool IsQueued { get; protected set; }
|
||||
|
||||
public bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor)
|
||||
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (target.Type != TargetType.Terrain)
|
||||
return false;
|
||||
|
||||
public bool CanTargetLocation(Actor self, CPos location, List<Actor> actorsAtLocation, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
if (modifiers.HasModifier(TargetModifiers.ForceMove))
|
||||
return false;
|
||||
|
||||
var location = target.CenterPosition.ToCPos();
|
||||
// Don't leak info about resources under the shroud
|
||||
if (!self.Owner.Shroud.IsExplored(location))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user