Replace usages of ISharedNotifyManager and IServerNotifyManager with extension methods (#1965)

* Replace usages of ISharedNotifyManager and IServerNotifyManager with extension methods

* Remove redundant code
This commit is contained in:
DrSmugleaf
2020-09-01 12:34:53 +02:00
committed by GitHub
parent 14259ed920
commit 8f9ed2f562
53 changed files with 247 additions and 375 deletions

View File

@@ -3,12 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.Components.Items.Clothing;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.GameObjects.EntitySystems.Click;
using Content.Server.Interfaces;
using Content.Server.Interfaces.GameObjects;
using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Interfaces;
using Robust.Server.GameObjects.Components.Container;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
@@ -29,7 +28,6 @@ namespace Content.Server.GameObjects.Components.GUI
public class InventoryComponent : SharedInventoryComponent, IExAct, IEffectBlocker, IPressureProtection
{
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
[Dependency] private readonly IServerNotifyManager _serverNotifyManager = default!;
[ViewVariables]
private readonly Dictionary<Slots, ContainerSlot> _slotContainers = new Dictionary<Slots, ContainerSlot>();
@@ -432,7 +430,7 @@ namespace Content.Server.GameObjects.Components.GUI
hands.PutInHand(clothing);
if (reason != null)
_serverNotifyManager.PopupMessageCursor(Owner, reason);
Owner.PopupMessageCursor(reason);
}
}
break;