ColorPalette GetPaletteForPlayer(string name) { var pr = Map.Players[name]; var pcpi = Rules.Info["player"].Traits.Get<PlayerColorPaletteInfo>(); var remap = new PlayerColorRemap(pr.ColorRamp, pcpi.PaletteFormat); return RenderUtils.MakeSystemPalette(new Palette(Palette, remap)); }
ColorPalette GetPaletteForPlayerInner(string name) { var pr = Map.Players[name]; var pcpi = Rules.Info["player"].Traits.Get<PlayerColorPaletteInfo>(); var remap = new PlayerColorRemap(pcpi.RemapIndex, pr.ColorRamp); return new Palette(PlayerPalette, remap).AsSystemPalette(); }