StyleCop clean Map/*.cs files

This commit is contained in:
Matthias Mailänder
2013-08-25 14:30:00 +02:00
parent ae00cb3adf
commit ba13c1d982
16 changed files with 68 additions and 72 deletions

View File

@@ -51,7 +51,7 @@ namespace OpenRA.Mods.RA
// Loop through the map looking for templates to overlay
for (int i = w.Map.Bounds.Left; i < w.Map.Bounds.Right; i++)
for (int j = w.Map.Bounds.Top; j < w.Map.Bounds.Bottom; j++)
if (BridgeTypes.Keys.Contains(w.Map.MapTiles.Value[i, j].type))
if (BridgeTypes.Keys.Contains(w.Map.MapTiles.Value[i, j].Type))
ConvertBridgeToActor(w, i, j);
// Link adjacent (long)-bridges so that artwork is updated correctly
@@ -66,8 +66,8 @@ namespace OpenRA.Mods.RA
return;
// Correlate the tile "image" aka subtile with its position to find the template origin
var tile = w.Map.MapTiles.Value[i, j].type;
var index = w.Map.MapTiles.Value[i, j].index;
var tile = w.Map.MapTiles.Value[i, j].Type;
var index = w.Map.MapTiles.Value[i, j].Index;
var template = w.TileSet.Templates[tile];
var ni = i - index % template.Size.X;
var nj = j - index / template.Size.X;
@@ -90,8 +90,8 @@ namespace OpenRA.Mods.RA
var y = nj + ind / template.Size.X;
// This isn't the bridge you're looking for
if (!w.Map.IsInMap(x, y) || w.Map.MapTiles.Value[x, y].type != tile ||
w.Map.MapTiles.Value[x, y].index != ind)
if (!w.Map.IsInMap(x, y) || w.Map.MapTiles.Value[x, y].Type != tile ||
w.Map.MapTiles.Value[x, y].Index != ind)
continue;
subTiles.Add(new CPos(x, y), ind);

8
OpenRA.Mods.RA/World/SmudgeLayer.cs Executable file → Normal file
View File

@@ -69,9 +69,9 @@ namespace OpenRA.Mods.RA
{
// Existing smudge; make it deeper
var tile = dirty.ContainsKey(loc) ? dirty[loc] : tiles[loc];
var depth = Info.Depths[tile.type - 1];
if (tile.index < depth - 1)
tile.index++;
var depth = Info.Depths[tile.Type - 1];
if (tile.Index < depth - 1)
tile.Index++;
dirty[loc] = tile;
}
@@ -106,7 +106,7 @@ namespace OpenRA.Mods.RA
if (world.ShroudObscures(kv.Key))
continue;
smudgeSprites[kv.Value.type - 1][kv.Value.index].DrawAt(kv.Key.ToPPos().ToFloat2(), pal);
smudgeSprites[kv.Value.Type - 1][kv.Value.Index].DrawAt(kv.Key.ToPPos().ToFloat2(), pal);
}
}
}