Fix IDE0038

This commit is contained in:
RoosterDragon
2023-02-19 11:28:54 +00:00
committed by Gustas
parent 71ce515d6d
commit 5b70d344cc
15 changed files with 33 additions and 29 deletions

View File

@@ -163,7 +163,7 @@ namespace OpenRA.Mods.Common.Traits
if (palette == null)
return r;
else
return r.Select(a => !a.IsDecoration && a is IPalettedRenderable ? ((IPalettedRenderable)a).WithPalette(palette) : a);
return r.Select(a => !a.IsDecoration && a is IPalettedRenderable pr ? pr.WithPalette(palette) : a);
}
else
return SpriteRenderable.None;