Add custom palette support to With*Overlay.
This commit is contained in:
@@ -19,6 +19,12 @@ namespace OpenRA.Mods.RA.Render
|
||||
[Desc("Sequence name to use")]
|
||||
public readonly string Sequence = "crumble-overlay";
|
||||
|
||||
[Desc("Custom palette name")]
|
||||
public readonly string Palette = null;
|
||||
|
||||
[Desc("Custom palette is a player palette BaseName")]
|
||||
public readonly bool IsPlayerPalette = false;
|
||||
|
||||
public object Create(ActorInitializer init) { return new WithCrumbleOverlay(init, this); }
|
||||
}
|
||||
|
||||
@@ -35,7 +41,8 @@ namespace OpenRA.Mods.RA.Render
|
||||
var overlay = new Animation(init.world, rs.GetImage(init.self));
|
||||
overlay.PlayThen(info.Sequence, () => buildComplete = false);
|
||||
rs.Add("make_overlay_{0}".F(info.Sequence),
|
||||
new AnimationWithOffset(overlay, null, () => !buildComplete));
|
||||
new AnimationWithOffset(overlay, null, () => !buildComplete),
|
||||
info.Palette, info.IsPlayerPalette);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user