Fix RA desert tree fire palette

By default WithDamageOverlay uses the actors'
palette, but RA's desert terrain uses the TD desert.pal
which isn't compatible with RA's fire animation shps.
This commit is contained in:
reaperrr
2019-11-21 16:19:35 +01:00
committed by abcdefg30
parent 142f823e6f
commit c4597b5c6b
2 changed files with 12 additions and 1 deletions

View File

@@ -29,6 +29,13 @@ namespace OpenRA.Mods.Common.Traits.Render
[SequenceReference("Image")]
public readonly string EndSequence = "end";
[PaletteReference("IsPlayerPalette")]
[Desc("Custom palette name.")]
public readonly string Palette = null;
[Desc("Custom palette is a player palette BaseName.")]
public readonly bool IsPlayerPalette = false;
[Desc("Damage types that this should be used for (defined on the warheads).",
"Leave empty to disable all filtering.")]
public readonly BitSet<DamageType> DamageTypes = default(BitSet<DamageType>);
@@ -54,7 +61,8 @@ namespace OpenRA.Mods.Common.Traits.Render
var rs = self.Trait<RenderSprites>();
anim = new Animation(self.World, info.Image);
rs.Add(new AnimationWithOffset(anim, null, () => !isSmoking));
rs.Add(new AnimationWithOffset(anim, null, () => !isSmoking),
info.Palette, info.IsPlayerPalette);
}
void INotifyDamage.Damaged(Actor self, AttackInfo e)

View File

@@ -928,16 +928,19 @@
WithDamageOverlay@SmallBurn:
DamageTypes: Incendiary
Image: burn-s
Palette: effect
MinimumDamageState: Light
MaximumDamageState: Medium
WithDamageOverlay@MediumBurn:
DamageTypes: Incendiary
Image: burn-m
Palette: effect
MinimumDamageState: Medium
MaximumDamageState: Heavy
WithDamageOverlay@LargeBurn:
DamageTypes: Incendiary
Image: burn-l
Palette: effect
MinimumDamageState: Heavy
MaximumDamageState: Dead
HiddenUnderShroud: