changes to TypeDictionary's interface. (build-palette is broken, so hasn't been tested)
This commit is contained in:
@@ -40,7 +40,7 @@ namespace OpenRa.Game.Orders
|
||||
if (!Game.LocalPlayer.Shroud.IsExplored(xy))
|
||||
return Cursor.MoveBlocked;
|
||||
|
||||
var movement = self.traits.WithInterface<IMovement>().FirstOrDefault();
|
||||
var movement = self.traits.GetOrDefault<IMovement>();
|
||||
return (movement.CanEnterCell(xy)) ? Cursor.Chronoshift : Cursor.MoveBlocked;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenRa.Game.Orders
|
||||
if (!Game.LocalPlayer.Shroud.IsExplored(xy))
|
||||
return Cursor.MoveBlocked;
|
||||
|
||||
var movement = self.traits.WithInterface<IMovement>().FirstOrDefault();
|
||||
var movement = self.traits.GetOrDefault<IMovement>();
|
||||
return (movement.CanEnterCell(xy)) ? Cursor.Chronoshift : Cursor.MoveBlocked;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace OpenRa.Game.Orders
|
||||
|
||||
Cursor CursorForOrderString(string s, Actor a, int2 location)
|
||||
{
|
||||
var movement = a.traits.WithInterface<IMovement>().FirstOrDefault();
|
||||
var movement = a.traits.GetOrDefault<IMovement>();
|
||||
switch (s)
|
||||
{
|
||||
case "Attack": return Cursor.Attack;
|
||||
|
||||
Reference in New Issue
Block a user