diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 4eb806fe9e..d0d366060f 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -35,7 +35,6 @@ namespace OpenRA.Traits // depends on the order of pips in WorldRenderer.cs! public enum PipType { Transparent, Green, Yellow, Red, Gray, Blue, Ammo, AmmoEmpty } - public enum TagType { None } [Flags] public enum Stance @@ -250,7 +249,6 @@ namespace OpenRA.Traits public interface ILoadsPlayerPalettes { void LoadPlayerPalettes(WorldRenderer wr, string playerName, HSLColor playerColor, bool replaceExisting); } public interface IPaletteModifier { void AdjustPalette(IReadOnlyDictionary b); } public interface IPips { IEnumerable GetPips(Actor self); } - public interface ITags { IEnumerable GetTags(); } public interface ISelectionBar { float GetValue(); Color GetColor(); } public interface IPositionableInfo : ITraitInfo { } diff --git a/OpenRA.Mods.Common/Traits/Render/SelectionDecorations.cs b/OpenRA.Mods.Common/Traits/Render/SelectionDecorations.cs index fcb982897d..df2758b451 100644 --- a/OpenRA.Mods.Common/Traits/Render/SelectionDecorations.cs +++ b/OpenRA.Mods.Common/Traits/Render/SelectionDecorations.cs @@ -42,7 +42,6 @@ namespace OpenRA.Mods.Common.Traits { // depends on the order of pips in TraitsInterfaces.cs! static readonly string[] PipStrings = { "pip-empty", "pip-green", "pip-yellow", "pip-red", "pip-gray", "pip-blue", "pip-ammo", "pip-ammoempty" }; - static readonly string[] TagStrings = { "" }; public readonly SelectionDecorationsInfo Info; readonly Actor self; @@ -90,16 +89,12 @@ namespace OpenRA.Mods.Common.Traits var pos = wr.ScreenPxPosition(self.CenterPosition); var tl = wr.Viewport.WorldToViewPx(pos + new int2(b.Left, b.Top)); var bl = wr.Viewport.WorldToViewPx(pos + new int2(b.Left, b.Bottom)); - var tm = wr.Viewport.WorldToViewPx(pos + new int2((b.Left + b.Right) / 2, b.Top)); foreach (var r in DrawControlGroup(wr, self, tl)) yield return r; foreach (var r in DrawPips(wr, self, bl)) yield return r; - - foreach (var r in DrawTags(wr, self, tm)) - yield return r; } IEnumerable DrawControlGroup(WorldRenderer wr, Actor self, int2 basePosition) @@ -153,28 +148,5 @@ namespace OpenRA.Mods.Common.Traits pipxyOffset = new int2(0, pipxyOffset.Y - (pipSize.Y + 1)); } } - - IEnumerable DrawTags(WorldRenderer wr, Actor self, int2 basePosition) - { - var tagImages = new Animation(self.World, "pips"); - var pal = wr.Palette(Info.Palette); - var tagxyOffset = new int2(0, 6); - - foreach (var tags in self.TraitsImplementing()) - { - foreach (var tag in tags.GetTags()) - { - if (tag == TagType.None) - continue; - - tagImages.PlayRepeating(TagStrings[(int)tag]); - var pos = basePosition + tagxyOffset - (0.5f * tagImages.Image.Size).ToInt2(); - yield return new UISpriteRenderable(tagImages.Image, self.CenterPosition, pos, 0, pal, 1f); - - // Increment row - tagxyOffset = tagxyOffset.WithY(tagxyOffset.Y + 8); - } - } - } } }