Add custom palette support to With*Overlay.

This commit is contained in:
Paul Chote
2014-05-22 23:25:53 +12:00
parent 900f5bffb5
commit 46a7c9c469
7 changed files with 56 additions and 7 deletions

View File

@@ -23,6 +23,12 @@ namespace OpenRA.Mods.RA.Render
[Desc("Position relative to body")]
public readonly WVec Offset = WVec.Zero;
[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 WithBuildingPlacedOverlay(init.self, this); }
}
@@ -43,7 +49,8 @@ namespace OpenRA.Mods.RA.Render
rs.Add("crane_overlay_{0}".F(info.Sequence),
new AnimationWithOffset(overlay,
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
() => !buildComplete));
() => !buildComplete),
info.Palette, info.IsPlayerPalette);
}
public void BuildingComplete(Actor self)