diff --git a/OpenRA.Mods.Cnc/Traits/Disguise.cs b/OpenRA.Mods.Cnc/Traits/Disguise.cs index 7eea99b29a..a3b379acec 100644 --- a/OpenRA.Mods.Cnc/Traits/Disguise.cs +++ b/OpenRA.Mods.Cnc/Traits/Disguise.cs @@ -93,6 +93,9 @@ namespace OpenRA.Mods.Cnc.Traits "A dictionary of [actor id]: [condition].")] public readonly Dictionary DisguisedAsConditions = new Dictionary(); + [Desc("Cursor to show when hovering over a valid actor to disguise as.")] + public readonly string Cursor = "ability"; + [GrantedConditionReference] public IEnumerable LinterConditions { get { return DisguisedAsConditions.Values; } } @@ -284,7 +287,7 @@ namespace OpenRA.Mods.Cnc.Traits readonly DisguiseInfo info; public DisguiseOrderTargeter(DisguiseInfo info) - : base("Disguise", 7, "ability", true, true) + : base("Disguise", 7, info.Cursor, true, true) { this.info = info; ForceAttack = false; diff --git a/OpenRA.Mods.Common/Traits/Carryall.cs b/OpenRA.Mods.Common/Traits/Carryall.cs index 89612d9c31..f70e119d6f 100644 --- a/OpenRA.Mods.Common/Traits/Carryall.cs +++ b/OpenRA.Mods.Common/Traits/Carryall.cs @@ -50,6 +50,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("Cursor to display when unable to drop off the passengers at location.")] public readonly string DropOffBlockedCursor = "move-blocked"; + [Desc("Cursor to display when picking up the passengers.")] + public readonly string PickUpCursor = "ability"; + [VoiceReference] public readonly string Voice = "Action"; @@ -266,7 +269,7 @@ namespace OpenRA.Mods.Common.Traits { get { - yield return new CarryallPickupOrderTargeter(); + yield return new CarryallPickupOrderTargeter(Info); yield return new DeployOrderTargeter("Unload", 10, () => CanUnload() ? Info.UnloadCursor : Info.UnloadBlockedCursor); yield return new CarryallDeliverUnitTargeter(aircraftInfo, Info); @@ -332,8 +335,8 @@ namespace OpenRA.Mods.Common.Traits class CarryallPickupOrderTargeter : UnitOrderTargeter { - public CarryallPickupOrderTargeter() - : base("PickupUnit", 5, "ability", false, true) + public CarryallPickupOrderTargeter(CarryallInfo info) + : base("PickupUnit", 5, info.PickUpCursor, false, true) { } diff --git a/OpenRA.Mods.Common/Traits/DeliversCash.cs b/OpenRA.Mods.Common/Traits/DeliversCash.cs index 3dd8a0bd76..3addeb7752 100644 --- a/OpenRA.Mods.Common/Traits/DeliversCash.cs +++ b/OpenRA.Mods.Common/Traits/DeliversCash.cs @@ -32,6 +32,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("Sound to play when delivering cash")] public readonly string[] Sounds = { }; + [Desc("Cursor to show when hovering over a valid actor to deliver cash to.")] + public readonly string Cursor = "enter"; + [VoiceReference] public readonly string Voice = "Action"; @@ -49,7 +52,7 @@ namespace OpenRA.Mods.Common.Traits public IEnumerable Orders { - get { yield return new DeliversCashOrderTargeter(); } + get { yield return new DeliversCashOrderTargeter(info); } } public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued) @@ -87,8 +90,8 @@ namespace OpenRA.Mods.Common.Traits public class DeliversCashOrderTargeter : UnitOrderTargeter { - public DeliversCashOrderTargeter() - : base("DeliverCash", 5, "enter", false, true) { } + public DeliversCashOrderTargeter(DeliversCashInfo info) + : base("DeliverCash", 5, info.Cursor, false, true) { } public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { diff --git a/OpenRA.Mods.Common/Traits/DeliversExperience.cs b/OpenRA.Mods.Common/Traits/DeliversExperience.cs index 765040bd7e..3773b98e5b 100644 --- a/OpenRA.Mods.Common/Traits/DeliversExperience.cs +++ b/OpenRA.Mods.Common/Traits/DeliversExperience.cs @@ -26,6 +26,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("Identifier checked against AcceptsDeliveredExperience.ValidTypes. Only needed if the latter is not empty.")] public readonly string Type = null; + [Desc("Cursor to show when hovering over a valid actor to deliver experience to.")] + public readonly string Cursor = "enter"; + [VoiceReference] public readonly string Voice = "Action"; @@ -50,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits get { if (gainsExperience.Level != 0) - yield return new DeliversExperienceOrderTargeter(); + yield return new DeliversExperienceOrderTargeter(info); } } @@ -90,8 +93,8 @@ namespace OpenRA.Mods.Common.Traits public class DeliversExperienceOrderTargeter : UnitOrderTargeter { - public DeliversExperienceOrderTargeter() - : base("DeliverExperience", 5, "enter", true, true) { } + public DeliversExperienceOrderTargeter(DeliversExperienceInfo info) + : base("DeliverExperience", 5, info.Cursor, true, true) { } public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) {