Remove hardcoded cursor bs; move TransformsOnDeploy to Mods.RA.

This commit is contained in:
Paul Chote
2010-07-08 20:23:19 +12:00
parent ac3924e660
commit df3581237e
22 changed files with 138 additions and 63 deletions

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Traits
public virtual object Create(ActorInitializer init) { return new Mobile(init, this); }
}
public class Mobile : IIssueOrder, IResolveOrder, IOccupySpace, IMove
public class Mobile : IIssueOrder, IResolveOrder, IOccupySpace, IMove, IProvideCursor
{
public readonly Actor self;
public readonly MobileInfo Info;
@@ -121,6 +121,14 @@ namespace OpenRA.Traits
}
}
}
public string CursorForOrderString(string s, Actor a, int2 location)
{
if (s != "Move")
return null;
return (CanEnterCell(location)) ? "move" : "move-blocked";
}
public int2 TopLeft { get { return toCell; } }