Fixes issues with support powers and adds property to all IOrderGenerator classes to determine priority over selection in the left-click order scheme.
This commit is contained in:
@@ -32,6 +32,7 @@ namespace OpenRA.Mods.Common.Orders
|
||||
|
||||
public string OrderID { get; private set; }
|
||||
public int OrderPriority { get; private set; }
|
||||
public bool OverrideSelection { get { return true; } }
|
||||
|
||||
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,10 @@ namespace OpenRA.Mods.Common.Orders
|
||||
producer = queue.Actor;
|
||||
building = name;
|
||||
|
||||
// Clear selection if using Left-Click Orders
|
||||
if (Game.Settings.Game.UseClassicMouseStyle)
|
||||
producer.World.Selection.Clear();
|
||||
|
||||
var map = producer.World.Map;
|
||||
var tileset = producer.World.TileSet.Id.ToLowerInvariant();
|
||||
buildingInfo = map.Rules.Actors[building].Traits.Get<BuildingInfo>();
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace OpenRA.Mods.Common.Orders
|
||||
public string OrderID { get; private set; }
|
||||
public int OrderPriority { get; private set; }
|
||||
public bool? ForceAttack = null;
|
||||
public bool OverrideSelection { get { return true; } }
|
||||
|
||||
public abstract bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor);
|
||||
public abstract bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor);
|
||||
|
||||
Reference in New Issue
Block a user