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:
@@ -23,7 +23,6 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
public class FlashComponent : MeleeWeaponComponent, IUse, IExamine
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly ISharedNotifyManager _notifyManager = default!;
|
||||
|
||||
public override string Name => "Flash";
|
||||
|
||||
@@ -101,7 +100,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
{
|
||||
sprite.LayerSetState(0, "burnt");
|
||||
|
||||
_notifyManager.PopupMessage(Owner, user, Loc.GetString("The flash burns out!"));
|
||||
Owner.PopupMessage(user, Loc.GetString("The flash burns out!"));
|
||||
}
|
||||
else if (!_flashing)
|
||||
{
|
||||
@@ -155,7 +154,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
|
||||
if (entity != user)
|
||||
{
|
||||
_notifyManager.PopupMessage(user, entity, Loc.GetString("{0:TheName} blinds you with {1:theName}", user, Owner));
|
||||
user.PopupMessage(entity, Loc.GetString("{0:TheName} blinds you with {1:theName}", user, Owner));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user