routing modifier keys where they need to be
This commit is contained in:
@@ -125,9 +125,9 @@ namespace OpenRa.Game.Traits
|
||||
return true;
|
||||
}
|
||||
|
||||
public Order IssueOrder(Actor self, int2 xy, bool lmb, Actor underCursor)
|
||||
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (lmb || underCursor == null) return null;
|
||||
if (mi.Button == MouseButton.Left || underCursor == null) return null;
|
||||
if (underCursor.Owner == self.Owner) return null;
|
||||
if (!Combat.HasAnyValidWeapons(self, underCursor)) return null;
|
||||
return Order.Attack(self, underCursor);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class Harvester : IOrder
|
||||
{
|
||||
@@ -25,9 +24,9 @@ namespace OpenRa.Game.Traits
|
||||
gemsCarried = 0;
|
||||
}
|
||||
|
||||
public Order IssueOrder(Actor self, int2 xy, bool lmb, Actor underCursor)
|
||||
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (lmb) return null;
|
||||
if (mi.Button == MouseButton.Left) return null;
|
||||
|
||||
if (underCursor != null
|
||||
&& underCursor.Owner == self.Owner
|
||||
|
||||
@@ -16,9 +16,9 @@ namespace OpenRa.Game.Traits
|
||||
targetLocation = self.Location;
|
||||
}
|
||||
|
||||
public Order IssueOrder(Actor self, int2 xy, bool lmb, Actor underCursor)
|
||||
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (lmb) return null;
|
||||
if (mi.Button == MouseButton.Left) return null;
|
||||
|
||||
if (underCursor == null)
|
||||
return Order.Move(self, xy);
|
||||
|
||||
@@ -6,9 +6,9 @@ namespace OpenRa.Game.Traits
|
||||
{
|
||||
public McvDeploy(Actor self) { }
|
||||
|
||||
public Order IssueOrder(Actor self, int2 xy, bool lmb, Actor underCursor)
|
||||
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (lmb) return null;
|
||||
if (mi.Button == MouseButton.Left) return null;
|
||||
if( xy != self.Location ) return null;
|
||||
|
||||
return Order.DeployMcv(self);
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace OpenRa.Game.Traits
|
||||
Game.UnitInfluence.Add(self, this);
|
||||
}
|
||||
|
||||
public Order IssueOrder(Actor self, int2 xy, bool lmb, Actor underCursor)
|
||||
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (lmb) return null;
|
||||
if (mi.Button == MouseButton.Left) return null;
|
||||
if (underCursor != null) return null;
|
||||
if (xy == toCell) return null;
|
||||
return Order.Move(self, xy);
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRa.Game.Traits
|
||||
p.Value.Tick( self.Owner );
|
||||
}
|
||||
|
||||
public Order IssueOrder( Actor self, int2 xy, bool lmb, Actor underCursor )
|
||||
public Order IssueOrder( Actor self, int2 xy, MouseInput mi, Actor underCursor )
|
||||
{
|
||||
// production isn't done by clicks in the world; the chrome handles it.
|
||||
return null;
|
||||
|
||||
@@ -24,9 +24,9 @@ namespace OpenRa.Game.Traits
|
||||
anim.Image, Util.CenterOfCell(rallyPoint));
|
||||
}
|
||||
|
||||
public Order IssueOrder(Actor self, int2 xy, bool lmb, Actor underCursor)
|
||||
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (lmb || underCursor != null) return null;
|
||||
if (mi.Button == MouseButton.Left || underCursor != null) return null;
|
||||
return Order.SetRallyPoint(self, xy);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace OpenRa.Game.Traits
|
||||
interface INotifyBuildComplete { void BuildingComplete (Actor self); }
|
||||
interface IOrder
|
||||
{
|
||||
Order IssueOrder( Actor self, int2 xy, bool lmb, Actor underCursor );
|
||||
Order IssueOrder( Actor self, int2 xy, MouseInput mi, Actor underCursor );
|
||||
void ResolveOrder( Actor self, Order order );
|
||||
}
|
||||
interface IProducer { bool Produce( Actor self, UnitInfo producee ); }
|
||||
|
||||
Reference in New Issue
Block a user