Skip to content

Commit

Permalink
Some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dnqbob committed Jan 15, 2024
1 parent eb4dd3d commit 99d4afd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OpenRA.Mods.Sp/Traits/GuardsSelection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GuardsSelectionInfo : ConditionalTraitInfo
public readonly int MaxGuardingTargets = 8;

[Desc("Orders to override to guard ally unit in selection. Use AttackGuards if you need override Attack/ForceAttack order.")]
public readonly HashSet<string> AttackMoveOrders = new() { "AttackMove", "AssaultMove", "AttackGuards" };
public readonly HashSet<string> OverrideOrders = new() { "AttackMove", "AssaultMove", "AttackGuards" };

public override object Create(ActorInitializer init) { return new GuardsSelection(this, init.Self); }
}
Expand All @@ -55,7 +55,7 @@ IEnumerable<IOrderTargeter> IIssueOrder.Orders
{
get
{
if (IsTraitDisabled || !Info.AttackMoveOrders.Contains("AttackGuards"))
if (IsTraitDisabled || !Info.OverrideOrders.Contains("AttackGuards"))
yield break;

yield return new AttackGuardOrderTargeter(this, 6);
Expand All @@ -72,7 +72,7 @@ Order IIssueOrder.IssueOrder(Actor self, IOrderTargeter order, in Target target,

void IResolveOrder.ResolveOrder(Actor self, Order order)
{
if (IsTraitDisabled || order.Target.Type == TargetType.Invalid || order.Queued || self.Owner.IsBot || !Info.AttackMoveOrders.Contains(order.OrderString))
if (IsTraitDisabled || order.Target.Type == TargetType.Invalid || order.Queued || self.Owner.IsBot || !Info.OverrideOrders.Contains(order.OrderString))
return;

var world = self.World;
Expand Down

0 comments on commit 99d4afd

Please sign in to comment.