Replace pragma warning 649 disable/restore with default!

This commit is contained in:
DrSmugleaf
2020-08-24 14:10:28 +02:00
parent 9e6459ac79
commit 8a27a5322a
147 changed files with 435 additions and 724 deletions

View File

@@ -9,15 +9,12 @@ namespace Content.Shared.GameObjects.Components.Cargo
{
public class SharedCargoConsoleComponent : Component
{
#pragma warning disable CS0649
[Dependency]
protected IPrototypeManager _prototypeManager;
#pragma warning restore
[Dependency] protected readonly IPrototypeManager PrototypeManager = default!;
public sealed override string Name => "CargoConsole";
/// <summary>
/// Sends away or requests shuttle
/// Sends away or requests shuttle
/// </summary>
[Serializable, NetSerializable]
public class CargoConsoleShuttleMessage : BoundUserInterfaceMessage

View File

@@ -14,9 +14,7 @@ namespace Content.Shared.GameObjects.Components.Mobs
{
public abstract class SharedStunnableComponent : Component, IMoveSpeedModifier, IActionBlocker, IInteractHand
{
#pragma warning disable 649
[Dependency] private IGameTiming _gameTiming;
#pragma warning restore 649
[Dependency] private readonly IGameTiming _gameTiming = default!;
public sealed override string Name => "Stunnable";
public override uint? NetID => ContentNetIDs.STUNNABLE;

View File

@@ -16,9 +16,7 @@ namespace Content.Shared.GameObjects.Components.Movement
{
public abstract class SharedSlipperyComponent : Component, ICollideBehavior
{
#pragma warning disable 649
[Dependency] private readonly IEntityManager _entityManager;
#pragma warning restore 649
[Dependency] private readonly IEntityManager _entityManager = default!;
public sealed override string Name => "Slippery";

View File

@@ -11,14 +11,11 @@ namespace Content.Shared.GameObjects.Components.Research
{
public class SharedLatheComponent : Component
{
[Dependency] protected readonly IPrototypeManager PrototypeManager = default!;
public override string Name => "Lathe";
public override uint? NetID => ContentNetIDs.LATHE;
#pragma warning disable CS0649
[Dependency]
protected IPrototypeManager _prototypeManager;
#pragma warning restore
public bool CanProduce(LatheRecipePrototype recipe, int quantity = 1)
{
if (!Owner.TryGetComponent(out SharedMaterialStorageComponent storage)
@@ -36,7 +33,7 @@ namespace Content.Shared.GameObjects.Components.Research
public bool CanProduce(string ID, int quantity = 1)
{
return _prototypeManager.TryIndex(ID, out LatheRecipePrototype recipe) && CanProduce(recipe, quantity);
return PrototypeManager.TryIndex(ID, out LatheRecipePrototype recipe) && CanProduce(recipe, quantity);
}
/// <summary>