WorldRenderer: use string.IsNullOrEmpty for check in Palette method

Unified usage of WorldRenderer.Palette method when it comes to appending player name (in case of player palette)
This commit is contained in:
michaeldgg2
2023-06-02 12:07:14 +02:00
committed by Gustas
parent b944b21325
commit 1a2d43fc99
4 changed files with 5 additions and 10 deletions

View File

@@ -47,10 +47,7 @@ namespace OpenRA.Mods.Common.Traits.Render
protected override PaletteReference GetPalette(Actor self, WorldRenderer wr)
{
if (!info.IsPlayerPalette)
return wr.Palette(info.Palette);
return wr.Palette(info.Palette + rb.Repairers[shownPlayer % rb.Repairers.Count].InternalName);
return wr.Palette(info.IsPlayerPalette ? info.Palette + rb.Repairers[shownPlayer % rb.Repairers.Count].InternalName : info.Palette);
}
void CycleRepairer()