Pass contextual information to TargetOverridesSelection.
This commit is contained in:
@@ -1180,7 +1180,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
OrderID = "Move";
|
||||
}
|
||||
|
||||
public bool TargetOverridesSelection(TargetModifiers modifiers)
|
||||
public bool TargetOverridesSelection(Actor self, Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers)
|
||||
{
|
||||
return modifiers.HasModifier(TargetModifiers.ForceMove);
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public string OrderID { get; private set; }
|
||||
public int OrderPriority { get; private set; }
|
||||
public bool TargetOverridesSelection(TargetModifiers modifiers) { return true; }
|
||||
public bool TargetOverridesSelection(Actor self, Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers) { return true; }
|
||||
|
||||
bool CanTargetActor(Actor self, Target target, ref TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public string OrderID { get { return "SetRallyPoint"; } }
|
||||
public int OrderPriority { get { return 0; } }
|
||||
public bool TargetOverridesSelection(TargetModifiers modifiers) { return true; }
|
||||
public bool TargetOverridesSelection(Actor self, Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers) { return true; }
|
||||
public bool ForceSet { get; private set; }
|
||||
|
||||
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor)
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
readonly TransformsIntoAircraft aircraft;
|
||||
|
||||
public bool TargetOverridesSelection(TargetModifiers modifiers)
|
||||
public bool TargetOverridesSelection(Actor self, Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers)
|
||||
{
|
||||
return modifiers.HasModifier(TargetModifiers.ForceMove);
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
readonly TransformsIntoMobile mobile;
|
||||
readonly bool rejectMove;
|
||||
public bool TargetOverridesSelection(TargetModifiers modifiers)
|
||||
public bool TargetOverridesSelection(Actor self, Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers)
|
||||
{
|
||||
return modifiers.HasModifier(TargetModifiers.ForceMove);
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public string OrderID { get { return "DeliverUnit"; } }
|
||||
public int OrderPriority { get { return 6; } }
|
||||
public bool IsQueued { get; protected set; }
|
||||
public bool TargetOverridesSelection(TargetModifiers modifiers) { return true; }
|
||||
public bool TargetOverridesSelection(Actor self, Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers) { return true; }
|
||||
|
||||
public CarryallDeliverUnitTargeter(AircraftInfo aircraftInfo, CarryallInfo info)
|
||||
{
|
||||
|
||||
@@ -379,7 +379,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 TargetOverridesSelection(TargetModifiers modifiers) { return true; }
|
||||
public bool TargetOverridesSelection(Actor self, Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers) { return true; }
|
||||
|
||||
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
|
||||
@@ -956,7 +956,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
readonly Mobile mobile;
|
||||
readonly LocomotorInfo locomotorInfo;
|
||||
readonly bool rejectMove;
|
||||
public bool TargetOverridesSelection(TargetModifiers modifiers)
|
||||
public bool TargetOverridesSelection(Actor self, Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers)
|
||||
{
|
||||
return modifiers.HasModifier(TargetModifiers.ForceMove);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user