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:
@@ -302,6 +302,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public string OrderID { get { return "Move"; } }
|
||||
public int OrderPriority { get { return 4; } }
|
||||
public bool OverrideSelection { get { return false; } }
|
||||
|
||||
readonly AircraftInfo info;
|
||||
|
||||
|
||||
@@ -194,6 +194,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public string OrderID { get; private set; }
|
||||
public int OrderPriority { get; private set; }
|
||||
public bool OverrideSelection { get { return true; } }
|
||||
|
||||
bool CanTargetActor(Actor self, Target target, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public string OrderID { get { return "SetRallyPoint"; } }
|
||||
public int OrderPriority { get { return 0; } }
|
||||
public bool OverrideSelection { get { return true; } }
|
||||
|
||||
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
|
||||
@@ -445,6 +445,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public string OrderID { get { return "Harvest"; } }
|
||||
public int OrderPriority { get { return 10; } }
|
||||
public bool IsQueued { get; protected set; }
|
||||
public bool OverrideSelection { get { return true; } }
|
||||
|
||||
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
|
||||
@@ -619,6 +619,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
readonly MobileInfo unitType;
|
||||
readonly bool rejectMove;
|
||||
public bool OverrideSelection { get { return false; } }
|
||||
|
||||
public MoveOrderTargeter(Actor self, MobileInfo unitType)
|
||||
{
|
||||
|
||||
@@ -102,6 +102,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public SelectTarget(World world, string order, SupportPowerManager manager, GrantUpgradePower power)
|
||||
{
|
||||
// Clear selection if using Left-Click Orders
|
||||
if (Game.Settings.Game.UseClassicMouseStyle)
|
||||
manager.Self.World.Selection.Clear();
|
||||
|
||||
this.manager = manager;
|
||||
this.order = order;
|
||||
this.power = power;
|
||||
|
||||
@@ -239,6 +239,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public SelectGenericPowerTarget(string order, SupportPowerManager manager, string cursor, MouseButton button)
|
||||
{
|
||||
// Clear selection if using Left-Click Orders
|
||||
if (Game.Settings.Game.UseClassicMouseStyle)
|
||||
manager.Self.World.Selection.Clear();
|
||||
|
||||
this.manager = manager;
|
||||
this.order = order;
|
||||
this.cursor = cursor;
|
||||
|
||||
Reference in New Issue
Block a user