diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 1657810019..d188a035c1 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -432,7 +432,6 @@ - diff --git a/OpenRA.Mods.RA/Render/WithSpinner.cs b/OpenRA.Mods.RA/Render/WithSpinner.cs deleted file mode 100755 index 68e003d42b..0000000000 --- a/OpenRA.Mods.RA/Render/WithSpinner.cs +++ /dev/null @@ -1,42 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using OpenRA.FileFormats; -using OpenRA.Graphics; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA.Render -{ - class WithSpinnerInfo : ITraitInfo, Requires, Requires - { - [Desc("Sequence name to use")] - public readonly string Sequence = "spinner"; - - [Desc("Position relative to body")] - public readonly WVec Offset = WVec.Zero; - - public object Create(ActorInitializer init) { return new WithSpinner(init.self, this); } - } - - class WithSpinner - { - public WithSpinner(Actor self, WithSpinnerInfo info) - { - var rs = self.Trait(); - var body = self.Trait(); - - var spinner = new Animation(rs.GetImage(self)); - spinner.PlayRepeating(info.Sequence); - rs.anims.Add("spinner_{0}".F(info.Sequence), new AnimationWithOffset(spinner, - () => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))), - null, p => WithTurret.ZOffsetFromCenter(self, p, 1))); - } - } -} diff --git a/mods/cnc/rules/vehicles.yaml b/mods/cnc/rules/vehicles.yaml index cb8acc2594..fa5a5f5b0e 100644 --- a/mods/cnc/rules/vehicles.yaml +++ b/mods/cnc/rules/vehicles.yaml @@ -565,7 +565,8 @@ MHQ: RevealsShroud: Range: 6 RenderUnit: - WithSpinner: + WithIdleOverlay@SPINNER: + Sequence: spinner Offset: -256,0,256 AttackMove: JustMove: yes diff --git a/mods/ra/rules/vehicles.yaml b/mods/ra/rules/vehicles.yaml index 89f8e773b7..c5dec0452a 100644 --- a/mods/ra/rules/vehicles.yaml +++ b/mods/ra/rules/vehicles.yaml @@ -509,8 +509,9 @@ MGG: RevealsShroud: Range: 6 RenderUnit: - WithSpinner: + WithIdleOverlay@SPINNER: Offset: -299,0,171 + Sequence: spinner AttackMove: JustMove: yes CreatesShroud: @@ -554,7 +555,8 @@ MRJ: RevealsShroud: Range: 6 RenderUnit: - WithSpinner: + WithIdleOverlay@SPINNER: + Sequence: spinner Offset: -256,0,256 AttackMove: JustMove: yes @@ -651,7 +653,8 @@ TTNK: LocalOffset: 0,0,213 AttackFrontal: RenderUnit: - WithSpinner: + WithIdleOverlay@SPINNER: + Sequence: spinner Selectable: Bounds: 28,28,0,0 AutoTarget: