diff --git a/OpenRA.Mods.RA/Effects/Rank.cs b/OpenRA.Mods.RA/Effects/Rank.cs index 3fbe71b108..8262a12b65 100644 --- a/OpenRA.Mods.RA/Effects/Rank.cs +++ b/OpenRA.Mods.RA/Effects/Rank.cs @@ -19,10 +19,12 @@ namespace OpenRA.Mods.RA.Effects { Actor self; Animation anim = new Animation("rank"); + readonly string paletteName; - public Rank(Actor self) + public Rank(Actor self, string paletteName) { this.self = self; + this.paletteName = paletteName; var xp = self.Trait(); anim.PlayRepeating("rank"); @@ -55,9 +57,10 @@ namespace OpenRA.Mods.RA.Effects var bounds = self.Bounds.Value; bounds.Offset(pos.X, pos.Y); + var palette = wr.Palette(paletteName); var offset = (int)(4 / wr.Viewport.Zoom); var effectPos = wr.Position(new int2(bounds.Right - offset, bounds.Bottom - offset)); - yield return new SpriteRenderable(anim.Image, effectPos, WVec.Zero, 0, wr.Palette("effect"), 1f / wr.Viewport.Zoom, true); + yield return new SpriteRenderable(anim.Image, effectPos, WVec.Zero, 0, palette, 1f / wr.Viewport.Zoom, true); } } } diff --git a/OpenRA.Mods.RA/GainsExperience.cs b/OpenRA.Mods.RA/GainsExperience.cs index b2af4ddf52..e7ffd935a8 100644 --- a/OpenRA.Mods.RA/GainsExperience.cs +++ b/OpenRA.Mods.RA/GainsExperience.cs @@ -23,6 +23,7 @@ namespace OpenRA.Mods.RA public readonly float[] FirepowerModifier = { 1.1f, 1.15f, 1.2f, 1.5f }; public readonly float[] ArmorModifier = { 1.1f, 1.2f, 1.3f, 1.5f }; public readonly decimal[] SpeedModifier = { 1.1m, 1.15m, 1.2m, 1.5m }; + public readonly string ChevronPalette = "effect"; public object Create(ActorInitializer init) { return new GainsExperience(init, this); } } @@ -75,7 +76,7 @@ namespace OpenRA.Mods.RA self.World.AddFrameEndTask(w => { if (!self.IsDead()) - w.Add(new Rank(self)); + w.Add(new Rank(self, info.ChevronPalette)); }); } } diff --git a/mods/ts/bits/levelup.shp b/mods/ts/bits/levelup.shp new file mode 100644 index 0000000000..eec8a7f72c Binary files /dev/null and b/mods/ts/bits/levelup.shp differ diff --git a/mods/ts/bits/rank.shp b/mods/ts/bits/rank.shp deleted file mode 100644 index 958aba6c3a..0000000000 Binary files a/mods/ts/bits/rank.shp and /dev/null differ diff --git a/mods/ts/rules/defaults.yaml b/mods/ts/rules/defaults.yaml index 5b6eeb68ed..3f81a22b31 100644 --- a/mods/ts/rules/defaults.yaml +++ b/mods/ts/rules/defaults.yaml @@ -107,6 +107,11 @@ CargoType: Infantry HiddenUnderFog: GainsExperience: + ChevronPalette: ra + CostThreshold: 5, 10 + FirepowerModifier: 1.2, 1.5 + ArmorModifier: 1.2, 1.5 + SpeedModifier: 1.2, 1.5 GivesExperience: DrawLineToTarget: ActorLostNotification: @@ -172,6 +177,11 @@ AttackMove: HiddenUnderFog: GainsExperience: + ChevronPalette: ra + CostThreshold: 5, 10 + FirepowerModifier: 1.2, 1.5 + ArmorModifier: 1.2, 1.5 + SpeedModifier: 1.2, 1.5 GivesExperience: DrawLineToTarget: ActorLostNotification: @@ -204,6 +214,11 @@ HiddenUnderFog: AttackMove: GainsExperience: + ChevronPalette: ra + CostThreshold: 5, 10 + FirepowerModifier: 1.2, 1.5 + ArmorModifier: 1.2, 1.5 + SpeedModifier: 1.2, 1.5 GivesExperience: DrawLineToTarget: ActorLostNotification: diff --git a/mods/ts/rules/world.yaml b/mods/ts/rules/world.yaml index 79c2cfd1e7..cb3a069b6f 100644 --- a/mods/ts/rules/world.yaml +++ b/mods/ts/rules/world.yaml @@ -17,6 +17,10 @@ World: Filename: cameo.pal AllowModifiers: false ShadowIndex: 242 + PaletteFromFile@ra: + Name: ra + Filename: palette.pal + ShadowIndex: 4 PaletteFromFile@effect: Name: effect Filename: anim.pal diff --git a/mods/ts/sequences/misc.yaml b/mods/ts/sequences/misc.yaml index bcba708efa..1e38009345 100644 --- a/mods/ts/sequences/misc.yaml +++ b/mods/ts/sequences/misc.yaml @@ -53,10 +53,16 @@ beacon: Length: 12 BlendMode: Additive -rank: # TODO: backfall to RA asset - rank: +crate-effects: + levelup: levelup Start: 0 Length: * + Tick: 200 + +rank: + rank: pips + Start: 7 + Length: 2 mpspawn: # TODO: backfall to RA asset idle: