Simplify names, remove unused usings, remove redundant casts.

This commit is contained in:
RoosterDragon
2016-01-17 21:24:41 +00:00
parent aaeb715006
commit 8e89a6a696
304 changed files with 218 additions and 639 deletions

View File

@@ -86,12 +86,12 @@ namespace OpenRA
Player player;
public OwnerInit() { }
public OwnerInit(string playerName) { this.PlayerName = playerName; }
public OwnerInit(string playerName) { PlayerName = playerName; }
public OwnerInit(Player player)
{
this.player = player;
this.PlayerName = player.InternalName;
PlayerName = player.InternalName;
}
public Player Value(World world)

View File

@@ -74,7 +74,7 @@ namespace OpenRA
return uv.V * Size.Width + uv.U;
}
/// <summary>Gets or sets the <see cref="OpenRA.CellLayer"/> using cell coordinates</summary>
/// <summary>Gets or sets the <see cref="CellLayer"/> using cell coordinates</summary>
public T this[CPos cell]
{
get

View File

@@ -16,7 +16,6 @@ using System.Linq;
using System.Security.Cryptography;
using System.Text;
using OpenRA.FileSystem;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Network;
using OpenRA.Support;
@@ -277,7 +276,7 @@ namespace OpenRA
{
var size = new Size(width, height);
Grid = Game.ModData.Manifest.Get<MapGrid>();
var tileRef = new TerrainTile(tileset.Templates.First().Key, (byte)0);
var tileRef = new TerrainTile(tileset.Templates.First().Key, 0);
Title = "Name your map here";
Description = "Describe your map here";
@@ -604,7 +603,7 @@ namespace OpenRA
foreach (var field in fields)
{
var f = this.GetType().GetField(field);
var f = GetType().GetField(field);
if (f.GetValue(this) == null)
continue;
root.Add(new MiniYamlNode(field, FieldSaver.FormatValue(this, f)));

View File

@@ -8,10 +8,8 @@
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace OpenRA
{
@@ -64,8 +62,8 @@ namespace OpenRA
public MapCoordsRegion(MPos mapTopLeft, MPos mapBottomRight)
{
this.topLeft = mapTopLeft;
this.bottomRight = mapBottomRight;
topLeft = mapTopLeft;
bottomRight = mapBottomRight;
}
public MapCoordsEnumerator GetEnumerator()

View File

@@ -13,7 +13,6 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Net;

View File

@@ -79,9 +79,9 @@ namespace OpenRA
public TerrainTemplateInfo(ushort id, string[] images, int2 size, byte[] tiles)
{
this.Id = id;
this.Images = images;
this.Size = size;
Id = id;
Images = images;
Size = size;
}
public TerrainTemplateInfo(TileSet tileSet, MiniYaml my)