document and expose GpsDot strings to lint testing

This commit is contained in:
Matthias Mailänder
2016-01-24 19:21:57 +01:00
parent 29e6f53a78
commit f709ef891a

View File

@@ -19,10 +19,16 @@ using OpenRA.Traits;
namespace OpenRA.Mods.RA.Effects namespace OpenRA.Mods.RA.Effects
{ {
[Desc("Attach this to actors to render pictograms while hidden.")]
class GpsDotInfo : ITraitInfo class GpsDotInfo : ITraitInfo
{ {
public readonly string String = "Infantry"; [Desc("Sprite collection for symbols.")]
public readonly string IndicatorPalettePrefix = "player"; public readonly string Image = "gpsdot";
[Desc("Sprite used for this actor.")]
[SequenceReference("Image")] public readonly string String = "Infantry";
[PaletteReference(true)] public readonly string IndicatorPalettePrefix = "player";
public object Create(ActorInitializer init) public object Create(ActorInitializer init)
{ {
@@ -58,7 +64,7 @@ namespace OpenRA.Mods.RA.Effects
{ {
this.self = self; this.self = self;
this.info = info; this.info = info;
anim = new Animation(self.World, "gpsdot"); anim = new Animation(self.World, info.Image);
anim.PlayRepeating(info.String); anim.PlayRepeating(info.String);
self.World.AddFrameEndTask(w => w.Add(this)); self.World.AddFrameEndTask(w => w.Add(this));