More resharper cleanup
This commit is contained in:
@@ -79,7 +79,7 @@ namespace Subsurface
|
||||
|
||||
public virtual void Remove()
|
||||
{
|
||||
dictionary.Remove(this.ID);
|
||||
dictionary.Remove(ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace Subsurface
|
||||
|
||||
GUI.DrawRectangle(sb, new Rectangle(rect.X, -rect.Y, rect.Width, rect.Height), clr);
|
||||
|
||||
if (isSelected && editing)
|
||||
if (isSelected)
|
||||
{
|
||||
GUI.DrawRectangle(sb,
|
||||
new Vector2(rect.X - 5, -rect.Y - 5),
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace Subsurface
|
||||
|
||||
OxygenPercentage = (float)(Game1.random.NextDouble() * 100.0);
|
||||
|
||||
properties = TypeDescriptor.GetProperties(this.GetType())
|
||||
properties = TypeDescriptor.GetProperties(GetType())
|
||||
.Cast<PropertyDescriptor>()
|
||||
.ToDictionary(pr => pr.Name);
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace Subsurface
|
||||
{
|
||||
if (PlayerInput.LeftButtonDown())
|
||||
{
|
||||
waveY[(int)(position.X - rect.X) / Hull.WaveWidth] = 100.0f;
|
||||
waveY[(int)(position.X - rect.X) / WaveWidth] = 100.0f;
|
||||
Volume = Volume + 1500.0f;
|
||||
}
|
||||
else if (PlayerInput.GetMouseState.RightButton == Microsoft.Xna.Framework.Input.ButtonState.Pressed)
|
||||
@@ -290,8 +290,8 @@ namespace Subsurface
|
||||
|
||||
spriteBatch.DrawString(GUI.font, "Pressure: " + ((int)pressure - rect.Y).ToString() +
|
||||
" - Lethality: " + lethalPressure +
|
||||
" - Oxygen: "+((int)OxygenPercentage).ToString(), new Vector2(rect.X+10, -rect.Y+10), Color.Black);
|
||||
spriteBatch.DrawString(GUI.font, volume.ToString() +" / "+ FullVolume.ToString(), new Vector2(rect.X+10, -rect.Y+30), Color.Black);
|
||||
" - Oxygen: "+((int)OxygenPercentage), new Vector2(rect.X+10, -rect.Y+10), Color.Black);
|
||||
spriteBatch.DrawString(GUI.font, volume +" / "+ FullVolume, new Vector2(rect.X+10, -rect.Y+30), Color.Black);
|
||||
|
||||
if (isSelected && editing)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Subsurface.Lights
|
||||
{
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Subsurface.Lights
|
||||
{
|
||||
|
||||
@@ -251,7 +251,7 @@ namespace Subsurface
|
||||
|
||||
public static bool InsideWall(Vector2 point)
|
||||
{
|
||||
Body foundBody = Map.PickBody(point);
|
||||
Body foundBody = PickBody(point);
|
||||
if (foundBody==null) return false;
|
||||
|
||||
Structure wall = foundBody.UserData as Structure;
|
||||
@@ -286,7 +286,7 @@ namespace Subsurface
|
||||
|
||||
try
|
||||
{
|
||||
string docString = doc.ToString();
|
||||
//string docString = doc.ToString();
|
||||
ToolBox.CompressStringToFile(filePath+".gz", doc.ToString());
|
||||
}
|
||||
catch
|
||||
@@ -342,7 +342,7 @@ namespace Subsurface
|
||||
public Map(string filePath, string mapHash="")
|
||||
{
|
||||
this.filePath = filePath;
|
||||
this.name = Path.GetFileNameWithoutExtension(filePath);
|
||||
name = Path.GetFileNameWithoutExtension(filePath);
|
||||
|
||||
if (mapHash != "")
|
||||
{
|
||||
|
||||
@@ -393,7 +393,7 @@ namespace Subsurface
|
||||
|
||||
public virtual XElement Save(XDocument doc)
|
||||
{
|
||||
DebugConsole.ThrowError("Saving entity " + this.GetType() + " failed.");
|
||||
DebugConsole.ThrowError("Saving entity " + GetType() + " failed.");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Subsurface
|
||||
{
|
||||
Vector2 placeSize = Map.gridSize;
|
||||
|
||||
if (placePosition == null || placePosition == Vector2.Zero)
|
||||
if (placePosition == Vector2.Zero)
|
||||
{
|
||||
if (PlayerInput.GetMouseState.LeftButton == ButtonState.Pressed)
|
||||
placePosition = Map.MouseToWorldGrid(cam);
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Subsurface
|
||||
|
||||
public void TransformTexCoord(Matrix transform)
|
||||
{
|
||||
this.texCoord = Vector2.Transform(this.texCoord, transform);
|
||||
texCoord = Vector2.Transform(texCoord, transform);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Subsurface
|
||||
wayPoints.Add(wayPoint);
|
||||
}
|
||||
|
||||
if (wayPoints.Count() == 0) return null;
|
||||
if (!wayPoints.Any()) return null;
|
||||
|
||||
return wayPoints[Game1.random.Next(wayPoints.Count())];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user