From 913e7fc995d025d8a16d1c37944450dfe4f78518 Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Mon, 22 Jan 2018 16:04:09 +0300 Subject: [PATCH] Unhardcode GrantExternalConditionPower cursors --- .../Traits/SupportPowers/GrantExternalConditionPower.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs index 4564bb4de4..1ba5f7d01b 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs @@ -38,6 +38,9 @@ namespace OpenRA.Mods.Common.Traits "This requires the actor to have the WithSpriteBody trait or one of its derivatives.")] public readonly string Sequence = "active"; + [Desc("Cursor to display when there are no units to apply the condition in range.")] + public readonly string BlockedCursor = "move-blocked"; + public override object Create(ActorInitializer init) { return new GrantExternalConditionPower(init.Self, this); } } @@ -153,7 +156,7 @@ namespace OpenRA.Mods.Common.Traits public string GetCursor(World world, CPos cell, int2 worldPixel, MouseInput mi) { - return power.UnitsInRange(cell).Any() ? "ability" : "move-blocked"; + return power.UnitsInRange(cell).Any() ? power.info.Cursor : power.info.BlockedCursor; } } }