Fix CursorForOrderString to work with orders + preliminary e6 fixes

This commit is contained in:
Paul Chote
2010-07-23 17:11:52 +12:00
parent 5019bb8b6e
commit 71420df0f3
25 changed files with 179 additions and 93 deletions

View File

@@ -56,8 +56,8 @@ namespace OpenRA.Orders
public string GetCursor( World world, int2 xy, MouseInput mi )
{
var c = Order(world, xy, mi)
.Select(o => o.Subject.traits.WithInterface<IProvideCursor>()
.Select(pc => pc.CursorForOrderString(o.OrderString, o.Subject, o.TargetLocation)).FirstOrDefault(a => a != null))
.Select(o => o.Subject.traits.WithInterface<IOrderCursor>()
.Select(pc => pc.CursorForOrder(o.Subject, o)).FirstOrDefault(a => a != null))
.FirstOrDefault(a => a != null);
return c ??