Replace pragma warning 649 disable/restore with default!
This commit is contained in:
@@ -14,9 +14,7 @@ namespace Content.Shared.Chemistry
|
||||
{
|
||||
private const float CelsiusToKelvin = 273.15f;
|
||||
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IModuleManager _moduleManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IModuleManager _moduleManager = default!;
|
||||
|
||||
private string _id;
|
||||
private string _name;
|
||||
|
||||
@@ -16,11 +16,9 @@ namespace Content.Shared
|
||||
// If you want to change your codebase's language, do it here.
|
||||
private const string Culture = "en-US";
|
||||
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
||||
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager;
|
||||
[Dependency] private readonly ILocalizationManager _localizationManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!;
|
||||
[Dependency] private readonly ILocalizationManager _localizationManager = default!;
|
||||
|
||||
public override void PreInit()
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -17,9 +17,7 @@ namespace Content.Shared.GameObjects.EntitySystems
|
||||
[UsedImplicitly]
|
||||
public class SharedInteractionSystem : EntitySystem
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPhysicsManager _physicsManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IPhysicsManager _physicsManager = default!;
|
||||
|
||||
public const float InteractionRange = 2;
|
||||
public const float InteractionRangeSquared = InteractionRange * InteractionRange;
|
||||
|
||||
@@ -5,12 +5,10 @@ using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Kitchen
|
||||
{
|
||||
|
||||
public class RecipeManager
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
public List<FoodRecipePrototype> Recipes { get; private set; }
|
||||
|
||||
public void Initialize()
|
||||
|
||||
@@ -6,9 +6,7 @@ namespace Content.Shared.Physics
|
||||
{
|
||||
public class SlipController : VirtualController
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPhysicsManager _physicsManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IPhysicsManager _physicsManager = default!;
|
||||
|
||||
public SlipController()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user