Merge pull request #5185 from reaperrr/rank-palette
Makes rank chevron palette customizable
This commit is contained in:
@@ -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<GainsExperience>();
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
BIN
mods/ts/bits/levelup.shp
Normal file
BIN
mods/ts/bits/levelup.shp
Normal file
Binary file not shown.
Binary file not shown.
BIN
mods/ts/maps/blank-testmap/map.bin
Normal file
BIN
mods/ts/maps/blank-testmap/map.bin
Normal file
Binary file not shown.
121
mods/ts/maps/blank-testmap/map.yaml
Normal file
121
mods/ts/maps/blank-testmap/map.yaml
Normal file
@@ -0,0 +1,121 @@
|
||||
Selectable: True
|
||||
|
||||
MapFormat: 6
|
||||
|
||||
RequiresMod: ts
|
||||
|
||||
Title: Blank Test Map
|
||||
|
||||
Description: Test Map
|
||||
|
||||
Author: Reaperrr
|
||||
|
||||
Tileset: INTERIOR
|
||||
|
||||
MapSize: 128,128
|
||||
|
||||
Bounds: 16,16,96,96
|
||||
|
||||
UseAsShellmap: False
|
||||
|
||||
Type: Conquest
|
||||
|
||||
Options:
|
||||
|
||||
Players:
|
||||
PlayerReference@Neutral:
|
||||
Name: Neutral
|
||||
OwnsWorld: True
|
||||
NonCombatant: True
|
||||
Race: gdi
|
||||
PlayerReference@Multi0:
|
||||
Name: Multi0
|
||||
Playable: True
|
||||
Race: Random
|
||||
Enemies: Creeps
|
||||
PlayerReference@Multi1:
|
||||
Name: Multi1
|
||||
Playable: True
|
||||
Race: Random
|
||||
Enemies: Creeps
|
||||
PlayerReference@Multi2:
|
||||
Name: Multi2
|
||||
Playable: True
|
||||
Race: Random
|
||||
Enemies: Creeps
|
||||
PlayerReference@Multi3:
|
||||
Name: Multi3
|
||||
Playable: True
|
||||
Race: Random
|
||||
Enemies: Creeps
|
||||
PlayerReference@Creeps:
|
||||
Name: Creeps
|
||||
NonCombatant: True
|
||||
Race: gdi
|
||||
Enemies: Multi0,Multi1,Multi2,Multi3
|
||||
|
||||
Actors:
|
||||
Actor0: mpspawn
|
||||
Location: 23,23
|
||||
Owner: Neutral
|
||||
Actor1: mpspawn
|
||||
Location: 103,23
|
||||
Owner: Neutral
|
||||
Actor2: gatech
|
||||
Location: 90,80
|
||||
Owner: Creeps
|
||||
Actor3: natech
|
||||
Location: 86,80
|
||||
Owner: Creeps
|
||||
Actor4: naradr
|
||||
Location: 82,80
|
||||
Owner: Creeps
|
||||
Actor5: hvr
|
||||
Location: 40,80
|
||||
Owner: Creeps
|
||||
Actor6: cyborg
|
||||
Location: 38,80
|
||||
Owner: Creeps
|
||||
Actor7: cyc2
|
||||
Location: 36,80
|
||||
Owner: Creeps
|
||||
Actor8: bike
|
||||
Location: 34,80
|
||||
Owner: Creeps
|
||||
Actor9: ttnk
|
||||
Location: 32,80
|
||||
Owner: Creeps
|
||||
Actor10: mmch
|
||||
Location: 30,80
|
||||
Owner: Creeps
|
||||
Actor11: gapowr
|
||||
Location: 90,85
|
||||
Owner: Creeps
|
||||
Actor12: gapowr
|
||||
Location: 87,85
|
||||
Owner: Creeps
|
||||
Actor13: napowr
|
||||
Location: 84,85
|
||||
Owner: Creeps
|
||||
Actor14: napowr
|
||||
Location: 81,85
|
||||
Owner: Creeps
|
||||
Actor15: napowr
|
||||
Location: 78,85
|
||||
Owner: Creeps
|
||||
|
||||
Smudges:
|
||||
|
||||
Rules:
|
||||
|
||||
Sequences:
|
||||
|
||||
VoxelSequences:
|
||||
|
||||
Weapons:
|
||||
|
||||
Voices:
|
||||
|
||||
Notifications:
|
||||
|
||||
Translations:
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user