add option to ban attacking ground
This commit is contained in:
@@ -34,6 +34,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public readonly int FireDelay = 0;
|
public readonly int FireDelay = 0;
|
||||||
|
|
||||||
public readonly bool AlignIdleTurrets = false;
|
public readonly bool AlignIdleTurrets = false;
|
||||||
|
public readonly bool CanAttackGround = true;
|
||||||
|
|
||||||
public virtual object Create(ActorInitializer init) { return new AttackBase(init.self); }
|
public virtual object Create(ActorInitializer init) { return new AttackBase(init.self); }
|
||||||
}
|
}
|
||||||
@@ -205,6 +206,7 @@ namespace OpenRA.Mods.RA
|
|||||||
if (!target.IsActor)
|
if (!target.IsActor)
|
||||||
{
|
{
|
||||||
if (!forceFire) return null;
|
if (!forceFire) return null;
|
||||||
|
if (!self.Info.Traits.Get<AttackBaseInfo>().CanAttackGround) return null;
|
||||||
return new Order("Attack", self, xy);
|
return new Order("Attack", self, xy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user