Unhardcode GrantExternalConditionPower cursors

This commit is contained in:
Mustafa Alperen Seki
2018-01-22 16:04:09 +03:00
committed by reaperrr
parent f136c200bc
commit 913e7fc995

View File

@@ -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;
}
}
}