Add remappable support to production icons.

This commit is contained in:
Matthias Mailänder
2020-01-26 17:40:43 +01:00
committed by abcdefg30
parent df4c363e9c
commit 9050a2447b
5 changed files with 13 additions and 4 deletions

View File

@@ -107,7 +107,8 @@ namespace OpenRA.Mods.Common.Widgets
var iconTopLeft = RenderOrigin + topLeftOffset;
var centerPosition = iconTopLeft;
WidgetUtils.DrawSHPCentered(icon.Image, centerPosition + 0.5f * iconSize, worldRenderer.Palette(unit.IconPalette), 0.5f);
var palette = unit.IconPaletteIsPlayerPalette ? unit.IconPalette + player.InternalName : unit.IconPalette;
WidgetUtils.DrawSHPCentered(icon.Image, centerPosition + 0.5f * iconSize, worldRenderer.Palette(palette), 0.5f);
armyIcons.Add(new ArmyIcon
{