Require explicit ITargetablePositions

This commit is contained in:
reaperrr
2017-09-27 23:08:43 +02:00
committed by abcdefg30
parent edeb980f5b
commit 7ca9679b34
3 changed files with 3 additions and 2 deletions

View File

@@ -354,6 +354,7 @@ namespace OpenRA.Traits
bool RequiresForceFire { get; }
}
[RequireExplicitImplementation]
public interface ITargetablePositions
{
IEnumerable<WPos> TargetablePositions(Actor self);

View File

@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.Traits
s.Info.Type.DrawCombatOverlay(wr, wcr, self);
var tc = Color.Lime;
var positions = activeShapes.SelectMany(tp => tp.TargetablePositions(self));
var positions = Target.FromActor(self).Positions;
foreach (var p in positions)
{
var center = wr.Screen3DPosition(p);

View File

@@ -73,7 +73,7 @@ namespace OpenRA.Mods.Common.Traits
base.Created(self);
}
public IEnumerable<WPos> TargetablePositions(Actor self)
IEnumerable<WPos> ITargetablePositions.TargetablePositions(Actor self)
{
if (IsTraitDisabled)
yield break;