Expose sprite sequence to linting and documentation.

This commit is contained in:
Matthias Mailänder
2022-01-15 16:04:52 +01:00
committed by reaperrr
parent 6dc189b7d1
commit 240c96b781

View File

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