Replace pragma warning 649 disable/restore with default!
This commit is contained in:
@@ -10,10 +10,9 @@ namespace Content.Client.GameObjects.Components.Access
|
||||
{
|
||||
public class IdCardConsoleBoundUserInterface : BoundUserInterface
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly ILocalizationManager _localizationManager;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly ILocalizationManager _localizationManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
public IdCardConsoleBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -14,12 +14,10 @@ namespace Content.Client.GameObjects.Components.Actor
|
||||
[RegisterComponent]
|
||||
public sealed class CharacterInfoComponent : Component, ICharacterUI
|
||||
{
|
||||
private CharacterInfoControl _control;
|
||||
[Dependency] private readonly ILocalizationManager _loc = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly ILocalizationManager _loc;
|
||||
[Dependency] private readonly IResourceCache _resourceCache;
|
||||
#pragma warning restore 649
|
||||
private CharacterInfoControl _control;
|
||||
|
||||
public override string Name => "CharacterInfo";
|
||||
|
||||
|
||||
@@ -20,12 +20,9 @@ namespace Content.Client.GameObjects.Components.Actor
|
||||
[RegisterComponent]
|
||||
public class CharacterInterface : Component
|
||||
{
|
||||
public override string Name => "Character Interface Component";
|
||||
[Dependency] private readonly IGameHud _gameHud = default!;
|
||||
|
||||
[Dependency]
|
||||
#pragma warning disable 649
|
||||
private readonly IGameHud _gameHud;
|
||||
#pragma warning restore 649
|
||||
public override string Name => "Character Interface Component";
|
||||
|
||||
/// <summary>
|
||||
/// Window to hold each of the character interfaces
|
||||
|
||||
@@ -10,9 +10,7 @@ namespace Content.Client.GameObjects.Components.Cargo
|
||||
[RegisterComponent]
|
||||
public class GalacticMarketComponent : SharedGalacticMarketComponent
|
||||
{
|
||||
#pragma warning disable CS0649
|
||||
[Dependency] private IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Event called when the database is updated.
|
||||
|
||||
@@ -21,9 +21,7 @@ namespace Content.Client.GameObjects.Components.Chemistry.ChemMaster
|
||||
/// </summary>
|
||||
public class ChemMasterWindow : SS14Window
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
/// <summary>Contains info about the reagent container such as it's contents, if one is loaded into the dispenser.</summary>
|
||||
private readonly VBoxContainer ContainerInfo;
|
||||
|
||||
@@ -20,9 +20,7 @@ namespace Content.Client.GameObjects.Components.Chemistry.ReagentDispenser
|
||||
/// </summary>
|
||||
public class ReagentDispenserWindow : SS14Window
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
/// <summary>Contains info about the reagent container such as it's contents, if one is loaded into the dispenser.</summary>
|
||||
private readonly VBoxContainer ContainerInfo;
|
||||
|
||||
@@ -11,12 +11,9 @@ namespace Content.Client.GameObjects.Components.Command
|
||||
{
|
||||
public class CommunicationsConsoleBoundUserInterface : BoundUserInterface
|
||||
{
|
||||
[ViewVariables]
|
||||
private CommunicationsConsoleMenu _menu;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
|
||||
#pragma warning disable 649
|
||||
[Dependency] private IGameTiming _gameTiming;
|
||||
#pragma warning restore 649
|
||||
[ViewVariables] private CommunicationsConsoleMenu _menu;
|
||||
|
||||
public bool CountdownStarted { get; private set; }
|
||||
|
||||
|
||||
@@ -18,11 +18,9 @@ namespace Content.Client.GameObjects.Components.HUD.Inventory
|
||||
[UsedImplicitly]
|
||||
public class HumanInventoryInterfaceController : InventoryInterfaceController
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly ILocalizationManager _loc;
|
||||
[Dependency] private readonly IResourceCache _resourceCache;
|
||||
[Dependency] private readonly IItemSlotManager _itemSlotManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly ILocalizationManager _loc = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private readonly IItemSlotManager _itemSlotManager = default!;
|
||||
|
||||
private readonly Dictionary<Slots, List<ItemSlotButton>> _inventoryButtons
|
||||
= new Dictionary<Slots, List<ItemSlotButton>>();
|
||||
@@ -43,7 +41,7 @@ namespace Content.Client.GameObjects.Components.HUD.Inventory
|
||||
base.Initialize();
|
||||
|
||||
_window = new HumanInventoryWindow(_loc, _resourceCache);
|
||||
_window.OnClose += () => _gameHud.InventoryButtonDown = false;
|
||||
_window.OnClose += () => GameHud.InventoryButtonDown = false;
|
||||
foreach (var (slot, button) in _window.Buttons)
|
||||
{
|
||||
button.OnPressed = (e) => AddToInventory(e, slot);
|
||||
@@ -153,7 +151,7 @@ namespace Content.Client.GameObjects.Components.HUD.Inventory
|
||||
{
|
||||
base.PlayerAttached();
|
||||
|
||||
_gameHud.InventoryQuickButtonContainer.AddChild(_quickButtonsContainer);
|
||||
GameHud.InventoryQuickButtonContainer.AddChild(_quickButtonsContainer);
|
||||
|
||||
// Update all the buttons to make sure they check out.
|
||||
|
||||
@@ -175,7 +173,7 @@ namespace Content.Client.GameObjects.Components.HUD.Inventory
|
||||
{
|
||||
base.PlayerDetached();
|
||||
|
||||
_gameHud.InventoryQuickButtonContainer.RemoveChild(_quickButtonsContainer);
|
||||
GameHud.InventoryQuickButtonContainer.RemoveChild(_quickButtonsContainer);
|
||||
|
||||
foreach (var (slot, list) in _inventoryButtons)
|
||||
{
|
||||
|
||||
@@ -12,9 +12,7 @@ namespace Content.Client.GameObjects.Components.HUD.Inventory
|
||||
{
|
||||
public abstract class InventoryInterfaceController : IDisposable
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] protected readonly IGameHud _gameHud;
|
||||
#pragma warning restore 649
|
||||
[Dependency] protected readonly IGameHud GameHud = default!;
|
||||
|
||||
protected InventoryInterfaceController(ClientInventoryComponent owner)
|
||||
{
|
||||
@@ -31,8 +29,8 @@ namespace Content.Client.GameObjects.Components.HUD.Inventory
|
||||
|
||||
public virtual void PlayerAttached()
|
||||
{
|
||||
_gameHud.InventoryButtonVisible = true;
|
||||
_gameHud.InventoryButtonToggled = b =>
|
||||
GameHud.InventoryButtonVisible = true;
|
||||
GameHud.InventoryButtonToggled = b =>
|
||||
{
|
||||
if (b)
|
||||
{
|
||||
@@ -47,7 +45,7 @@ namespace Content.Client.GameObjects.Components.HUD.Inventory
|
||||
|
||||
public virtual void PlayerDetached()
|
||||
{
|
||||
_gameHud.InventoryButtonVisible = false;
|
||||
GameHud.InventoryButtonVisible = false;
|
||||
Window.Close();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,15 +9,13 @@ namespace Content.Client.GameObjects.Components
|
||||
[RegisterComponent]
|
||||
public class InteractionOutlineComponent : Component
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
private const string ShaderInRange = "SelectionOutlineInrange";
|
||||
private const string ShaderOutOfRange = "SelectionOutline";
|
||||
|
||||
public override string Name => "InteractionOutline";
|
||||
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore 649
|
||||
|
||||
private ShaderInstance _selectionShaderInstance;
|
||||
private ShaderInstance _selectionShaderInRangeInstance;
|
||||
|
||||
|
||||
@@ -20,10 +20,9 @@ namespace Content.Client.GameObjects.Components.Kitchen
|
||||
{
|
||||
public class MicrowaveBoundUserInterface : BoundUserInterface
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IEntityManager _entityManager;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
private MicrowaveMenu _menu;
|
||||
|
||||
private Dictionary<int, EntityUid> _solids = new Dictionary<int, EntityUid>();
|
||||
|
||||
@@ -24,6 +24,10 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
[ComponentReference(typeof(SharedOverlayEffectsComponent))]
|
||||
public sealed class ClientOverlayEffectsComponent : SharedOverlayEffectsComponent//, ICharacterUI
|
||||
{
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private readonly IReflectionManager _reflectionManager = default!;
|
||||
[Dependency] private readonly IClientNetManager _netManager = default!;
|
||||
|
||||
/// <summary>
|
||||
/// A list of overlay containers representing the current overlays applied
|
||||
/// </summary>
|
||||
@@ -36,13 +40,6 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
set => SetEffects(value);
|
||||
}
|
||||
|
||||
#pragma warning disable 649
|
||||
// Required dependencies
|
||||
[Dependency] private readonly IOverlayManager _overlayManager;
|
||||
[Dependency] private readonly IReflectionManager _reflectionManager;
|
||||
[Dependency] private readonly IClientNetManager _netManager;
|
||||
#pragma warning restore 649
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
@@ -23,12 +23,10 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
[ComponentReference(typeof(SharedStatusEffectsComponent))]
|
||||
public sealed class ClientStatusEffectsComponent : SharedStatusEffectsComponent
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPlayerManager _playerManager;
|
||||
[Dependency] private readonly IResourceCache _resourceCache;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager;
|
||||
[Dependency] private readonly IGameTiming _gameTiming;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
|
||||
private StatusEffectsUI _ui;
|
||||
private Dictionary<StatusEffect, StatusEffectStatus> _status = new Dictionary<StatusEffect, StatusEffectStatus>();
|
||||
|
||||
@@ -12,10 +12,8 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
[ComponentReference(typeof(SharedCombatModeComponent))]
|
||||
public sealed class CombatModeComponent : SharedCombatModeComponent
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPlayerManager _playerManager;
|
||||
[Dependency] private readonly IGameHud _gameHud;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IGameHud _gameHud = default!;
|
||||
|
||||
public override bool IsInCombatMode
|
||||
{
|
||||
|
||||
@@ -12,6 +12,10 @@ namespace Content.Client.GameObjects.Components.Observer
|
||||
[RegisterComponent]
|
||||
public class GhostComponent : SharedGhostComponent
|
||||
{
|
||||
[Dependency] private readonly IGameHud _gameHud = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IComponentManager _componentManager = default!;
|
||||
|
||||
private GhostGui _gui;
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
@@ -19,12 +23,6 @@ namespace Content.Client.GameObjects.Components.Observer
|
||||
|
||||
private bool _isAttached;
|
||||
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IGameHud _gameHud;
|
||||
[Dependency] private readonly IPlayerManager _playerManager;
|
||||
[Dependency] private IComponentManager _componentManager;
|
||||
#pragma warning restore 649
|
||||
|
||||
public override void OnRemove()
|
||||
{
|
||||
base.OnRemove();
|
||||
|
||||
@@ -19,10 +19,9 @@ namespace Content.Client.GameObjects.Components.PDA
|
||||
{
|
||||
public class PDABoundUserInterface : BoundUserInterface
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager;
|
||||
#pragma warning restore 649
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
|
||||
|
||||
private PDAMenu _menu;
|
||||
private PDAMenuPopup failPopup;
|
||||
|
||||
|
||||
@@ -12,10 +12,8 @@ namespace Content.Client.GameObjects.Components.Research
|
||||
{
|
||||
public class LatheBoundUserInterface : BoundUserInterface
|
||||
{
|
||||
#pragma warning disable CS0649
|
||||
[Dependency]
|
||||
private IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
[ViewVariables]
|
||||
private LatheMenu _menu;
|
||||
[ViewVariables]
|
||||
|
||||
@@ -10,10 +10,7 @@ namespace Content.Client.GameObjects.Components.Research
|
||||
[ComponentReference(typeof(SharedLatheDatabaseComponent))]
|
||||
public class LatheDatabaseComponent : SharedLatheDatabaseComponent
|
||||
{
|
||||
#pragma warning disable CS0649
|
||||
[Dependency]
|
||||
private IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
{
|
||||
|
||||
@@ -11,10 +11,7 @@ namespace Content.Client.GameObjects.Components.Research
|
||||
[ComponentReference(typeof(SharedLatheDatabaseComponent))]
|
||||
public class ProtolatheDatabaseComponent : SharedProtolatheDatabaseComponent
|
||||
{
|
||||
#pragma warning disable CS0649
|
||||
[Dependency]
|
||||
private IPrototypeManager _prototypeManager;
|
||||
#pragma warning restore
|
||||
[Dependency] private IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when the database gets updated.
|
||||
|
||||
@@ -16,11 +16,10 @@ namespace Content.Client.GameObjects.Components.Sound
|
||||
[RegisterComponent]
|
||||
public class LoopingSoundComponent : SharedLoopingSoundComponent
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
|
||||
private readonly Dictionary<ScheduledSound, IPlayingAudioStream> _audioStreams = new Dictionary<ScheduledSound, IPlayingAudioStream>();
|
||||
private AudioSystem _audioSystem;
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IRobustRandom _random;
|
||||
#pragma warning restore 649
|
||||
|
||||
public override void StopAllSounds()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user