Refactoring pass.
- Extract an enum for edges rather than using magic numbers for everything. - Remove duplicated code between FoggedEdges and ShroudedEdges by hosting the visibility function into a delegate. - Make minimap methods more readable. - Tidy formatting. - Make some fields readonly. - Remove unused usings.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Traits
|
||||
public readonly Rectangle Bounds;
|
||||
readonly Actor actor;
|
||||
|
||||
public IRenderable[] Renderables { set; private get; }
|
||||
public IRenderable[] Renderables { private get; set; }
|
||||
public Player Owner;
|
||||
|
||||
public string TooltipName;
|
||||
@@ -84,6 +84,7 @@ namespace OpenRA.Traits
|
||||
return Renderables.Concat(Renderables.Where(r => !r.IsDecoration)
|
||||
.Select(r => r.WithPalette(highlight)));
|
||||
}
|
||||
|
||||
return Renderables;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user