Remove obsolete "GetFilterFromEntity" method from PopupSystem.

This commit is contained in:
Vera Aguilera Puerto
2021-10-03 16:19:07 +02:00
parent 3e2a8738a9
commit 4f70dc87f0
2 changed files with 4 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Player;
namespace Content.Shared.Popups
{
@@ -16,7 +17,7 @@ namespace Content.Shared.Popups
{
var popupSystem = EntitySystem.Get<SharedPopupSystem>();
popupSystem.PopupEntity(message, source.Uid, popupSystem.GetFilterFromEntity(viewer));
popupSystem.PopupEntity(message, source.Uid, Filter.Entities(viewer.Uid));
}
/// <summary>
@@ -38,7 +39,7 @@ namespace Content.Shared.Popups
public static void PopupMessage(this EntityCoordinates coordinates, IEntity viewer, string message)
{
var popupSystem = EntitySystem.Get<SharedPopupSystem>();
popupSystem.PopupCoordinates(message, coordinates, popupSystem.GetFilterFromEntity(viewer));
popupSystem.PopupCoordinates(message, coordinates, Filter.Entities(viewer.Uid));
}
/// <summary>
@@ -51,7 +52,7 @@ namespace Content.Shared.Popups
public static void PopupMessageCursor(this IEntity viewer, string message)
{
var popupSystem = EntitySystem.Get<SharedPopupSystem>();
popupSystem.PopupCursor(message, popupSystem.GetFilterFromEntity(viewer));
popupSystem.PopupCursor(message, Filter.Entities(viewer.Uid));
}
}
}

View File

@@ -33,16 +33,6 @@ namespace Content.Shared.Popups
/// <param name="uid">The UID of the entity.</param>
/// <param name="filter">Filter for the players that will see the popup.</param>
public abstract void PopupEntity(string message, EntityUid uid, Filter filter);
/// <summary>
/// Given an <see cref="IEntity"/>, returns a <see cref="Filter"/> that is either empty or contains the
/// player attached to the entity.
/// </summary>
/// <remarks>Using this method is NOT recommended, please use one of the other methods instead.</remarks>
public Filter GetFilterFromEntity(IEntity entity)
{
return Filter.Entities(entity.Uid);
}
}
/// <summary>