support d2k remap range

This commit is contained in:
Paul Chote
2010-09-12 00:55:05 +12:00
parent 7e5b861caf
commit 629e73ac29
6 changed files with 13 additions and 10 deletions

View File

@@ -19,12 +19,12 @@ namespace OpenRA.Mods.RA
class ColorPickerPaletteModifier : IPaletteModifier, IWorldLoaded
{
bool SplitPlayerPalette;
PaletteFormat format;
public void WorldLoaded(World w)
{
// Copy the base palette for the colorpicker
var info = Rules.Info["world"].Traits.Get<PlayerColorPaletteInfo>();
SplitPlayerPalette = info.SplitRamp;
format = info.PaletteFormat;
w.WorldRenderer.AddPalette("colorpicker", w.WorldRenderer.GetPalette(info.BasePalette));
}
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA
{
palettes["colorpicker"] = new Palette(palettes["colorpicker"],
new PlayerColorRemap(LobbyDelegate.CurrentColorPreview1,
LobbyDelegate.CurrentColorPreview2, SplitPlayerPalette));
LobbyDelegate.CurrentColorPreview2, format));
}
}
}