Replace pragma warning 649 disable/restore with default!
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user