Rider static analysis (#433)

* Non-accessed local variable

* Merge cast and type checks.

* StringComparison.Ordinal added for better culture support

* Supposed code improvement in launcher. Remove unused code.

* Update ExplosionHelper.cs

Unintentional change.

* Optimized Import

* Add Robust.Shared.Utility import where it was deleted

* Other random suggestion

* Improve my comment
This commit is contained in:
ZelteHonor
2019-11-13 17:37:46 -05:00
committed by Pieter-Jan Briers
parent 62b31eee00
commit b2e2aef78d
138 changed files with 190 additions and 400 deletions

View File

@@ -1,7 +1,7 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using System;
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects
{

View File

@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Inventory

View File

@@ -1,6 +1,5 @@
using Robust.Shared.GameObjects;
using System;
using Robust.Shared.Serialization;
using System;
namespace Content.Shared.GameObjects.Components.Items
{

View File

@@ -1,6 +1,6 @@
using Robust.Shared.GameObjects;
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using System;
namespace Content.Shared.GameObjects.Components.Items
{

View File

@@ -1,7 +1,7 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using System;
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects
{

View File

@@ -44,12 +44,10 @@ namespace Content.Shared.GameObjects.Components.Materials
if (serializer.TryReadDataField("materials", out List<MaterialDataEntry> list))
{
var protoMan = IoCManager.Resolve<IPrototypeManager>();
int index = 0;
foreach (var entry in list)
{
var proto = protoMan.Index<MaterialPrototype>(entry.Value);
_materialTypes[entry.Key] = proto.Material;
index++;
}
}

View File

@@ -1,6 +1,4 @@
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Nutrition
{

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Power

View File

@@ -1,9 +1,5 @@
using Robust.Shared.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Power
{

View File

@@ -1,15 +1,14 @@
// Only unused on .NET Core due to KeyValuePair.Deconstruct
// ReSharper disable once RedundantUsingDirective
using Robust.Shared.Utility;
using System;
using System.Collections.Generic;
using Content.Shared.Materials;
using Content.Shared.Research;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.UserInterface;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Content.Shared.GameObjects.Components.Research
{

View File

@@ -4,7 +4,6 @@ using System.Collections.Generic;
using Content.Shared.Research;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;

View File

@@ -3,9 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using Content.Shared.Research;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;

View File

@@ -1,15 +1,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using Content.Shared.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Serialization;
using Robust.Shared.Timers;
namespace Content.Shared.GameObjects.Components.Sound
{

View File

@@ -1,7 +1,7 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using System;
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Storage
{

View File

@@ -1,11 +1,8 @@
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.UserInterface;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using System;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.UserInterface;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.VendingMachines
{

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects;

View File

@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Reflection;
// Only unused on .NET Core due to KeyValuePair.Deconstruct
// ReSharper disable once RedundantUsingDirective
using Robust.Shared.Utility;
using System;
using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Utility;
namespace Content.Shared.GameObjects
{

View File

@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Utility;