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

@@ -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)
{