what a hack; it mostly works, but there are edge cases.

This commit is contained in:
Chris Forbes
2009-12-20 23:04:07 +13:00
parent 13636e9c54
commit 5a4fba43b0
4 changed files with 132 additions and 11 deletions

View File

@@ -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));
}
}
}
}