Require explicit ITargetablePositions
This commit is contained in:
@@ -354,6 +354,7 @@ namespace OpenRA.Traits
|
||||
bool RequiresForceFire { get; }
|
||||
}
|
||||
|
||||
[RequireExplicitImplementation]
|
||||
public interface ITargetablePositions
|
||||
{
|
||||
IEnumerable<WPos> TargetablePositions(Actor self);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user