Make the cursor configurable and expose it to Trait docs.

This commit is contained in:
Matthias Mailänder
2016-05-26 19:28:38 +02:00
parent 3e011a74af
commit 6803de9539

View File

@@ -43,6 +43,8 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Voice string when planting explosive charges.")] [Desc("Voice string when planting explosive charges.")]
[VoiceReference] public readonly string Voice = "Action"; [VoiceReference] public readonly string Voice = "Action";
public readonly string Cursor = "c4";
public object Create(ActorInitializer init) { return new Demolition(this); } public object Create(ActorInitializer init) { return new Demolition(this); }
} }
@@ -57,7 +59,7 @@ namespace OpenRA.Mods.Common.Traits
public IEnumerable<IOrderTargeter> Orders public IEnumerable<IOrderTargeter> Orders
{ {
get { yield return new DemolitionOrderTargeter("c4"); } get { yield return new DemolitionOrderTargeter(info.Cursor); }
} }
public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued) public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued)