From 240c96b7815d7027243fe1dd8d3d15dfe0ccb309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 15 Jan 2022 16:04:52 +0100 Subject: [PATCH] Expose sprite sequence to linting and documentation. --- .../Traits/SupportPowers/GrantExternalConditionPower.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs index 34e02b8ba4..06e5296c41 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs @@ -51,6 +51,11 @@ namespace OpenRA.Mods.Common.Traits [Desc("Cursor to display when there are no units to apply the condition in range.")] public readonly string BlockedCursor = "move-blocked"; + public readonly string FootprintImage = "overlay"; + + [SequenceReference(nameof(FootprintImage))] + public readonly string FootprintSequence = "target-select"; + public override object Create(ActorInitializer init) { return new GrantExternalConditionPower(init.Self, this); } } @@ -127,7 +132,7 @@ namespace OpenRA.Mods.Common.Traits footprint = power.info.Footprint.Where(c => !char.IsWhiteSpace(c)).ToArray(); dimensions = power.info.Dimensions; - var sequence = world.Map.Rules.Sequences.GetSequence("overlay", "target-select"); + var sequence = world.Map.Rules.Sequences.GetSequence(power.info.FootprintImage, power.info.FootprintSequence); tile = sequence.GetSprite(0); alpha = sequence.GetAlpha(0); }