diff --git a/OpenRA.Mods.Common/Effects/Beacon.cs b/OpenRA.Mods.Common/Effects/Beacon.cs index 76b4e9d11b..623d9068f0 100644 --- a/OpenRA.Mods.Common/Effects/Beacon.cs +++ b/OpenRA.Mods.Common/Effects/Beacon.cs @@ -51,20 +51,20 @@ namespace OpenRA.Mods.Common.Effects } // Support power beacons are expected to clean themselves up - public Beacon(Player owner, WPos position, string palettePrefix, string posterType, string posterPalette, Func clockFraction) + public Beacon(Player owner, WPos position, string palettePrefix, string posterCollection, string posterType, string posterPalette, string clockSequence, Func clockFraction) : this(owner, position, -1, palettePrefix) { this.posterPalette = posterPalette; if (posterType != null) { - poster = new Animation(owner.World, "beacon"); + poster = new Animation(owner.World, posterCollection); poster.Play(posterType); if (clockFraction != null) { - clock = new Animation(owner.World, "beacon"); - clock.PlayFetchIndex("clock", () => Exts.Clamp((int)(clockFraction() * (clock.CurrentSequence.Length - 1)), 0, clock.CurrentSequence.Length - 1)); + clock = new Animation(owner.World, posterCollection); + clock.PlayFetchIndex(clockSequence, () => Exts.Clamp((int)(clockFraction() * (clock.CurrentSequence.Length - 1)), 0, clock.CurrentSequence.Length - 1)); } } } diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs index 117450b12a..c4a2a848e0 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs @@ -170,8 +170,10 @@ namespace OpenRA.Mods.Common.Traits self.Owner, target - new WVec(0, 0, altitude), Info.BeaconPalettePrefix, + Info.BeaconImage, Info.BeaconPoster, Info.BeaconPosterPalette, + Info.ClockSequence, () => 1 - ((distanceTestActor.CenterPosition - target).HorizontalLength - info.BeaconDistanceOffset.Length) * 1f / distance); w.Add(beacon); diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/NukePower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/NukePower.cs index d39584be2e..8c929a60e7 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/NukePower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/NukePower.cs @@ -135,8 +135,10 @@ namespace OpenRA.Mods.Common.Traits order.Player, targetPosition, Info.BeaconPalettePrefix, + Info.BeaconImage, Info.BeaconPoster, Info.BeaconPosterPalette, + Info.ClockSequence, () => missile.FractionComplete); Action removeBeacon = () => self.World.AddFrameEndTask(w => diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs index 9d4a18b15e..2d7f8a9126 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs @@ -45,9 +45,11 @@ namespace OpenRA.Mods.Common.Traits [Desc("Beacons are only supported on the Airstrike and Nuke powers")] public readonly bool DisplayBeacon = false; - public readonly string BeaconPalettePrefix = "player"; - public readonly string BeaconPoster = null; + [PaletteReference(true)] public readonly string BeaconPalettePrefix = "player"; + public readonly string BeaconImage = "beacon"; + [SequenceReference("BeaconImage")] public readonly string BeaconPoster = null; [PaletteReference] public readonly string BeaconPosterPalette = "chrome"; + [SequenceReference("BeaconImage")] public readonly string ClockSequence = "clock"; public readonly bool DisplayRadarPing = false; diff --git a/OpenRA.Mods.RA/Traits/SupportPowers/ParatroopersPower.cs b/OpenRA.Mods.RA/Traits/SupportPowers/ParatroopersPower.cs index 5d7de97992..01f7b53cb2 100644 --- a/OpenRA.Mods.RA/Traits/SupportPowers/ParatroopersPower.cs +++ b/OpenRA.Mods.RA/Traits/SupportPowers/ParatroopersPower.cs @@ -205,8 +205,10 @@ namespace OpenRA.Mods.RA.Traits self.Owner, target - new WVec(0, 0, altitude), Info.BeaconPalettePrefix, + Info.BeaconImage, Info.BeaconPoster, Info.BeaconPosterPalette, + Info.ClockSequence, () => 1 - ((distanceTestActor.CenterPosition - target).HorizontalLength - info.BeaconDistanceOffset.Length) * 1f / distance); w.Add(beacon);