diff --git a/OpenRA.Mods.RA/Effects/Beacon.cs b/OpenRA.Mods.RA/Effects/Beacon.cs index 8ae5a4a4e9..90abc83f7d 100644 --- a/OpenRA.Mods.RA/Effects/Beacon.cs +++ b/OpenRA.Mods.RA/Effects/Beacon.cs @@ -20,21 +20,30 @@ namespace OpenRA.Mods.RA.Effects readonly Player owner; readonly WPos position; readonly string palettePrefix; + readonly string posterPalette; readonly Animation arrow = new Animation("beacon"); readonly Animation circles = new Animation("beacon"); + readonly Animation poster; static readonly int maxArrowHeight = 512; int arrowHeight = maxArrowHeight; int arrowSpeed = 50; - public Beacon(Player owner, WPos position, int duration, string palettePrefix) + public Beacon(Player owner, WPos position, int duration, string palettePrefix, string posterType, string posterPalette) { this.owner = owner; this.position = position; this.palettePrefix = palettePrefix; + this.posterPalette = posterPalette; arrow.Play("arrow"); circles.Play("circles"); + if (posterType != null) + { + poster = new Animation("beacon"); + poster.Play(posterType); + } + owner.World.Add(new DelayedAction(duration, () => owner.World.Remove(this))); } @@ -55,10 +64,18 @@ namespace OpenRA.Mods.RA.Effects public IEnumerable Render(WorldRenderer r) { if (!owner.IsAlliedWith(owner.World.RenderPlayer)) - return SpriteRenderable.None; + yield break; var palette = r.Palette(palettePrefix + owner.InternalName); - return circles.Render(position, palette).Concat(arrow.Render(position + new WVec(0, 0, arrowHeight), palette)); + foreach (var a in circles.Render(position, palette)) + yield return a; + + foreach (var a in arrow.Render(position + new WVec(0, 0, arrowHeight), palette)) + yield return a; + + if (poster != null) + foreach (var a in poster.Render(position, r.Palette(posterPalette))) + yield return a; } } } diff --git a/OpenRA.Mods.RA/Player/PlaceBeacon.cs b/OpenRA.Mods.RA/Player/PlaceBeacon.cs index 8e7464744f..7cc382b769 100644 --- a/OpenRA.Mods.RA/Player/PlaceBeacon.cs +++ b/OpenRA.Mods.RA/Player/PlaceBeacon.cs @@ -49,7 +49,7 @@ namespace OpenRA.Mods.RA if (playerBeacon != null) self.World.Remove(playerBeacon); - playerBeacon = new Beacon(self.Owner, pos, info.Duration, info.PalettePrefix); + playerBeacon = new Beacon(self.Owner, pos, info.Duration, info.PalettePrefix, null, null); self.World.Add(playerBeacon); if (self.Owner.IsAlliedWith(self.World.RenderPlayer)) diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPower.cs b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs index 6817ab41de..19d17eef9f 100755 --- a/OpenRA.Mods.RA/SupportPowers/SupportPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs @@ -34,6 +34,8 @@ namespace OpenRA.Mods.RA public readonly bool DisplayBeacon = false; public readonly int BeaconDuration = 10 * 25; public readonly string BeaconPalettePrefix = "player"; + public readonly string BeaconPoster = null; + public readonly string BeaconPosterPalette = "chrome"; public readonly bool DisplayRadarPing = false; public readonly string OrderName; @@ -72,7 +74,9 @@ namespace OpenRA.Mods.RA order.Player, order.TargetLocation.CenterPosition, Info.BeaconDuration, - Info.BeaconPalettePrefix); + Info.BeaconPalettePrefix, + Info.BeaconPoster, + Info.BeaconPosterPalette); self.World.Add(beacon); } diff --git a/mods/cnc/bits/atomicon.shp b/mods/cnc/bits/atomicon.shp new file mode 100644 index 0000000000..bdbc59a4ec Binary files /dev/null and b/mods/cnc/bits/atomicon.shp differ diff --git a/mods/cnc/bits/bombicon.shp b/mods/cnc/bits/bombicon.shp new file mode 100644 index 0000000000..819a384191 Binary files /dev/null and b/mods/cnc/bits/bombicon.shp differ diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index 8961845dc1..42f9ecc89e 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -384,6 +384,7 @@ HQ: IncomingSound: enemya.aud UnitType: a10 DisplayBeacon: True + BeaconPoster: airstrike DisplayRadarPing: True CameraActor: camera SupportPowerChargeBar: @@ -491,6 +492,7 @@ TMPL: IncomingSound: nuke1.aud MissileWeapon: atomic DisplayBeacon: True + BeaconPoster: atomic DisplayRadarPing: True SupportPowerChargeBar: diff --git a/mods/cnc/sequences/misc.yaml b/mods/cnc/sequences/misc.yaml index 32d33bd732..33aa39ef28 100644 --- a/mods/cnc/sequences/misc.yaml +++ b/mods/cnc/sequences/misc.yaml @@ -161,6 +161,14 @@ beacon: circles: fpls Start: 0 Length: * + airstrike: bombicon + Start: 0 + Length: 1 + Offset: 0,-42 + atomic: atomicon + Start: 0 + Length: 1 + Offset: 0,-42 select: repair: