Fix CA1854

This commit is contained in:
RoosterDragon
2023-03-12 17:38:38 +00:00
committed by abcdefg30
parent 56fe08cb00
commit 231bf01f18
26 changed files with 93 additions and 86 deletions

View File

@@ -109,8 +109,8 @@ namespace OpenRA.Graphics
palette.ReplacePalette(name, pal);
// Update cached PlayerReference if one exists
if (palettes.ContainsKey(name))
palettes[name].Palette = pal;
if (palettes.TryGetValue(name, out var paletteReference))
paletteReference.Palette = pal;
}
public void SetPaletteColorShift(string name, float hueOffset, float satOffset, float valueModifier, float minHue, float maxHue)