Fix IDE0200
This commit is contained in:
committed by
Gustas Kažukauskas
parent
ce3ad6fbb3
commit
0338258b45
@@ -288,7 +288,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
|
||||
|
||||
public static void Write(Stream s, Size size, IEnumerable<byte[]> frames)
|
||||
{
|
||||
var compressedFrames = frames.Select(f => LCWCompression.Encode(f)).ToList();
|
||||
var compressedFrames = frames.Select(LCWCompression.Encode).ToList();
|
||||
|
||||
// note: end-of-file and all-zeroes headers
|
||||
var dataOffset = 14 + (compressedFrames.Count + 2) * 8;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
return 0;
|
||||
}
|
||||
|
||||
wr.AddPalette(info.Name, new ImmutablePalette(Enumerable.Range(0, Palette.Size).Select(i => MakeColor(i))));
|
||||
wr.AddPalette(info.Name, new ImmutablePalette(Enumerable.Range(0, Palette.Size).Select(MakeColor)));
|
||||
}
|
||||
|
||||
public IEnumerable<string> PaletteNames { get { yield return info.Name; } }
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
var ratio = Common.Util.RandomInRange(world.LocalRandom, info.Ratio);
|
||||
var positions = cells.Shuffle(world.LocalRandom)
|
||||
.Take(Math.Max(1, cells.Count * ratio / 100))
|
||||
.Select(x => world.Map.CenterOfCell(x));
|
||||
.Select(world.Map.CenterOfCell);
|
||||
|
||||
foreach (var position in positions)
|
||||
world.AddFrameEndTask(w => w.Add(new SpriteEffect(position, w, info.Image, info.Sequences.Random(w.LocalRandom), info.Palette)));
|
||||
|
||||
Reference in New Issue
Block a user