Merge pull request #8817 from penev92/bleed_cleanups
Touch up a few files
This commit is contained in:
@@ -27,7 +27,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
class BridgeLayer : IWorldLoaded
|
||||
{
|
||||
readonly BridgeLayerInfo info;
|
||||
Dictionary<ushort, Pair<string, int>> bridgeTypes = new Dictionary<ushort, Pair<string, int>>();
|
||||
readonly Dictionary<ushort, Pair<string, int>> bridgeTypes = new Dictionary<ushort, Pair<string, int>>();
|
||||
|
||||
CellLayer<Bridge> bridges;
|
||||
|
||||
public BridgeLayer(Actor self, BridgeLayerInfo info)
|
||||
@@ -47,10 +48,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
bridgeTypes.Add(template.First, Pair.New(bridge, template.Second));
|
||||
}
|
||||
|
||||
// Loop through the map looking for templates to overlay
|
||||
foreach (var cell in w.Map.AllCells)
|
||||
if (bridgeTypes.ContainsKey(w.Map.MapTiles.Value[cell].Type))
|
||||
ConvertBridgeToActor(w, cell);
|
||||
// Take all templates to overlay from the map
|
||||
foreach (var cell in w.Map.AllCells.Where(cell => bridgeTypes.ContainsKey(w.Map.MapTiles.Value[cell].Type)))
|
||||
ConvertBridgeToActor(w, cell);
|
||||
|
||||
// Link adjacent (long)-bridges so that artwork is updated correctly
|
||||
foreach (var b in w.Actors.SelectMany(a => a.TraitsImplementing<Bridge>()))
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Support;
|
||||
@@ -53,11 +51,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
class MovementClassDomainIndex
|
||||
{
|
||||
Map map;
|
||||
|
||||
uint movementClass;
|
||||
CellLayer<int> domains;
|
||||
Dictionary<int, HashSet<int>> transientConnections;
|
||||
readonly Map map;
|
||||
readonly uint movementClass;
|
||||
readonly CellLayer<int> domains;
|
||||
readonly Dictionary<int, HashSet<int>> transientConnections;
|
||||
|
||||
public MovementClassDomainIndex(World world, uint movementClass)
|
||||
{
|
||||
@@ -168,8 +165,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
void BuildDomains(World world)
|
||||
{
|
||||
var map = world.Map;
|
||||
|
||||
var domain = 1;
|
||||
|
||||
var visited = new CellLayer<bool>(map);
|
||||
|
||||
Reference in New Issue
Block a user