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:
@@ -130,13 +130,13 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
||||
|
||||
if (!Opened)
|
||||
{
|
||||
target.PopupMessage(target, Loc.GetString("Open it first!"));
|
||||
target.PopupMessage(Loc.GetString("Open it first!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_contents.CurrentVolume.Float() <= 0)
|
||||
{
|
||||
target.PopupMessage(target, Loc.GetString("It's empty!"));
|
||||
target.PopupMessage(Loc.GetString("It's empty!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -151,14 +151,14 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
if (_useSound == null) return false;
|
||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_useSound, target, AudioParams.Default.WithVolume(-2f));
|
||||
target.PopupMessage(target, Loc.GetString("Slurp"));
|
||||
target.PopupMessage(Loc.GetString("Slurp"));
|
||||
UpdateAppearance();
|
||||
return true;
|
||||
}
|
||||
|
||||
//Stomach was full or can't handle whatever solution we have.
|
||||
_contents.TryAddSolution(split);
|
||||
target.PopupMessage(target, Loc.GetString("You've had enough {0}!", Owner.Name));
|
||||
target.PopupMessage(Loc.GetString("You've had enough {0}!", Owner.Name));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
if (_utensilsNeeded != UtensilType.None)
|
||||
{
|
||||
eventArgs.User.PopupMessage(eventArgs.User, Loc.GetString("You need to use a {0} to eat that!", _utensilsNeeded));
|
||||
eventArgs.User.PopupMessage(Loc.GetString("You need to use a {0} to eat that!", _utensilsNeeded));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
||||
|
||||
if (UsesRemaining <= 0)
|
||||
{
|
||||
user.PopupMessage(user, Loc.GetString("{0:TheName} is empty!", Owner));
|
||||
user.PopupMessage(Loc.GetString("{0:TheName} is empty!", Owner));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user