Fix "You can't reach there!" message being created twice

This commit is contained in:
DrSmugleaf
2020-07-08 16:00:04 +02:00
parent fb51aecfbf
commit 4ec733577f

View File

@@ -137,14 +137,17 @@ namespace Content.Server.GameObjects.Components.Mobs
var strapPosition = strap.Owner.Transform.MapPosition;
if (!InteractionChecks.InRangeUnobstructed(user, strapPosition, _range) ||
ContainerHelpers.IsInContainer(Owner))
if (!InteractionChecks.InRangeUnobstructed(user, strapPosition, _range))
{
_notifyManager.PopupMessage(user, user,
Loc.GetString("You can't reach there!"));
return false;
}
if (ContainerHelpers.IsInContainer(Owner))
{
_notifyManager.PopupMessage(strap.Owner, user,
Loc.GetString("You can't reach there!"));
}
if (!user.HasComponent<HandsComponent>())
{
_notifyManager.PopupMessage(user, user,