Implement DeployToUpgrade.

Expose some deploy-related cursors to yaml.
This commit is contained in:
Taryn Hill
2015-04-05 02:45:33 -05:00
parent 70c9bca847
commit 0717ca57ea
7 changed files with 133 additions and 9 deletions

View File

@@ -39,6 +39,12 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Notification to play when the transformation is blocked.")]
public readonly string NoTransformNotification = null;
[Desc("Cursor to display when able to (un)deploy the actor.")]
public readonly string DeployCursor = "deploy";
[Desc("Cursor to display when unable to (un)deploy the actor.")]
public readonly string DeployBlockedCursor = "deploy-blocked";
public virtual object Create(ActorInitializer init) { return new Transforms(init, this); }
}
@@ -73,7 +79,8 @@ namespace OpenRA.Mods.Common.Traits
public IEnumerable<IOrderTargeter> Orders
{
get { yield return new DeployOrderTargeter("DeployTransform", 5, () => CanDeploy()); }
get { yield return new DeployOrderTargeter("DeployTransform", 5,
() => CanDeploy() ? info.DeployCursor : info.DeployBlockedCursor); }
}
public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued)