diff --git a/OpenRA.Mods.RA/Effects/GpsDot.cs b/OpenRA.Mods.RA/Effects/GpsDot.cs index 4d96d00f21..6614dc10a8 100644 --- a/OpenRA.Mods.RA/Effects/GpsDot.cs +++ b/OpenRA.Mods.RA/Effects/GpsDot.cs @@ -12,29 +12,33 @@ using System.Collections.Generic; using System.Drawing; using OpenRA.Effects; using OpenRA.Traits; +using OpenRA.Graphics; namespace OpenRA.Mods.RA.Effects { class GpsDotInfo : ITraitInfo { - public readonly string String = "o"; + public readonly string String = "Infantry"; public object Create(ActorInitializer init) { return new GpsDot(init, String); } } + class GpsDot : IEffect { - string s; int2 loc; Color color; Actor self; GpsWatcher watcher; bool show = false; + Animation anim; public GpsDot(ActorInitializer init, string s) { - this.s = s; + anim = new Animation("gpsdot"); + anim.PlayRepeating(s); + self = init.self; loc = self.CenterLocation; color = self.Owner.ColorRamp.GetColor(0); @@ -67,9 +71,8 @@ namespace OpenRA.Mods.RA.Effects public IEnumerable Render() { - if(show) - Game.Renderer.TinyBoldFont.DrawTextWithContrast(s, loc - Game.viewport.Location, color, Color.Black, 1); - yield break; + if (show) + yield return Traits.Util.Centered(self, anim.Image, self.CenterLocation.ToFloat2()); } } } diff --git a/mods/ra/rules/aircraft.yaml b/mods/ra/rules/aircraft.yaml index f3cf07b4b3..3367c3c82f 100644 --- a/mods/ra/rules/aircraft.yaml +++ b/mods/ra/rules/aircraft.yaml @@ -179,7 +179,7 @@ YAK: TRAN: - Inherits: ^Plane + Inherits: ^Helicopter Buildable: Queue: Plane BuildPaletteOrder: 110 @@ -218,7 +218,7 @@ TRAN: Explosion: UnitExplode HELI: - Inherits: ^Plane + Inherits: ^Helicopter Buildable: Queue: Plane BuildPaletteOrder: 90 @@ -262,7 +262,7 @@ HELI: Offset: 0,-10 HIND: - Inherits: ^Plane + Inherits: ^Helicopter Buildable: Queue: Plane BuildPaletteOrder: 90 diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index 9f97915b7d..515180fce0 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -29,7 +29,7 @@ Types:Vehicle GivesBounty: GpsDot: - String:O + String:Vehicle ^Tank: AppearsOnRadar: @@ -62,7 +62,7 @@ Types:Tank GivesBounty: GpsDot: - String:O + String:Vehicle ^Infantry: AppearsOnRadar: @@ -101,7 +101,7 @@ Types:Infantry GivesBounty: GpsDot: - String:o + String:Infantry ^Ship: AppearsOnRadar: @@ -126,7 +126,7 @@ Types:Ship GivesBounty: GpsDot: - String:O + String:Ship ^Plane: AppearsOnRadar: @@ -153,7 +153,11 @@ SuccessRate: 50 GivesBounty: GpsDot: - String:O + String:Plane + +^Helicopter: + GpsDot: + String:Helicopter ^Building: AppearsOnRadar: diff --git a/mods/ra/sequences.yaml b/mods/ra/sequences.yaml index a51cd4325e..6a21b956a4 100644 --- a/mods/ra/sequences.yaml +++ b/mods/ra/sequences.yaml @@ -1917,3 +1917,16 @@ boxes09: idle: Start: 0 Length: * + +gpsdot: + Infantry: + Start: 0 + Vehicle: + Start: 1 + Ship: + Start: 2 + Helicopter: + Start: 3 + Plane: + Start: 4 +