Replace IPreventsAutoTarget with IDisable(Enemy)AutoTarget.

This allows traits on the attacking unit to suppress auto targeting
and makes the distinction between the two interfaces clear.
This commit is contained in:
Paul Chote
2019-05-17 19:51:35 +00:00
committed by abcdefg30
parent f9fe7486b3
commit 55f6744cf3
3 changed files with 23 additions and 6 deletions

View File

@@ -297,9 +297,16 @@ namespace OpenRA.Mods.Common.Traits
void ModifyTransformActorInit(Actor self, TypeDictionary init);
}
public interface IPreventsAutoTarget
[RequireExplicitImplementation]
public interface IDisableEnemyAutoTarget
{
bool PreventsAutoTarget(Actor self, Actor attacker);
bool DisableEnemyAutoTarget(Actor self, Actor attacker);
}
[RequireExplicitImplementation]
public interface IDisableAutoTarget
{
bool DisableAutoTarget(Actor self);
}
[RequireExplicitImplementation]