PlayerColorPalette now using the full palette if no RemapIndex is set.

This commit is contained in:
Andre Mohren
2022-05-26 10:58:26 +02:00
committed by Gustas
parent df72d303b8
commit 0e5f33ef93
7 changed files with 18 additions and 13 deletions

View File

@@ -10,6 +10,7 @@
#endregion
using System;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Traits;
@@ -53,7 +54,7 @@ namespace OpenRA.Mods.Common.Traits
{
var (_, h, s, _) = info.Color.ToAhsv();
var remap = new PlayerColorRemap(info.RemapIndex, h, s);
var remap = new PlayerColorRemap(info.RemapIndex.Length == 0 ? Enumerable.Range(0, 256).ToArray() : info.RemapIndex, h, s);
wr.AddPalette(info.Name, new ImmutablePalette(wr.Palette(info.Base).Palette, remap), info.AllowModifiers);
}
}