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:
@@ -1,6 +1,7 @@
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Server.Interfaces;
|
||||
using Content.Server.Interfaces.Chat;
|
||||
using Content.Shared.Interfaces;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
@@ -13,7 +14,6 @@ namespace Content.Server.GameObjects.Components
|
||||
class RadioComponent : Component, IUse, IListen
|
||||
{
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
||||
[Dependency] private readonly IServerNotifyManager _notifyManager = default!;
|
||||
|
||||
public override string Name => "Radio";
|
||||
|
||||
@@ -60,11 +60,11 @@ namespace Content.Server.GameObjects.Components
|
||||
RadioOn = !RadioOn;
|
||||
if(RadioOn)
|
||||
{
|
||||
_notifyManager.PopupMessage(Owner, eventArgs.User, "The radio is now on.");
|
||||
Owner.PopupMessage(eventArgs.User, "The radio is now on.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_notifyManager.PopupMessage(Owner, eventArgs.User, "The radio is now off.");
|
||||
Owner.PopupMessage(eventArgs.User, "The radio is now off.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user