add a "capturing" condition for ExternalCapture

This commit is contained in:
gwenzek
2017-09-05 21:52:37 +02:00
committed by abcdefg30
parent 8027bed6b2
commit 7721d0b328
3 changed files with 28 additions and 9 deletions

View File

@@ -173,6 +173,8 @@ namespace OpenRA.Mods.Common.Traits
firstTick = false;
}
protected override void TraitDisabled(Actor self) { Uncloak(); }
public bool IsVisible(Actor self, Player viewer)
{
if (!Cloaked || self.Owner.IsAlliedWith(viewer))

View File

@@ -34,6 +34,10 @@ namespace OpenRA.Mods.Common.Traits
[VoiceReference] public readonly string Voice = "Action";
[GrantedConditionReference]
[Desc("Condition granted when capturing.")]
public readonly string CapturingCondition = null;
public readonly string CaptureCursor = "ability";
public readonly string CaptureBlockedCursor = "move-blocked";