what a hack; it mostly works, but there are edge cases.
This commit is contained in:
@@ -17,6 +17,8 @@ namespace OpenRa.Game.Traits
|
||||
if (mi.Button == MouseButton.Left) return null;
|
||||
if (underCursor == null)
|
||||
return Order.Move(self, xy);
|
||||
if (underCursor.Info == Rules.UnitInfo["AFLD"])
|
||||
return Order.DeliverOre(self, underCursor); /* brutal hack */
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -27,6 +29,12 @@ namespace OpenRa.Game.Traits
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(new Circle(order.TargetLocation));
|
||||
}
|
||||
|
||||
if (order.OrderString == "DeliverOre")
|
||||
{
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(new ReturnToBase(self, order.TargetActor.CenterLocation));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user