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")] [SequenceReference("Image")]
public readonly string EndSequence = "end"; 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).", [Desc("Damage types that this should be used for (defined on the warheads).",
"Leave empty to disable all filtering.")] "Leave empty to disable all filtering.")]
public readonly BitSet<DamageType> DamageTypes = default(BitSet<DamageType>); public readonly BitSet<DamageType> DamageTypes = default(BitSet<DamageType>);
@@ -54,7 +61,8 @@ namespace OpenRA.Mods.Common.Traits.Render
var rs = self.Trait<RenderSprites>(); var rs = self.Trait<RenderSprites>();
anim = new Animation(self.World, info.Image); 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) void INotifyDamage.Damaged(Actor self, AttackInfo e)

View File

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